2011-10-31 66 views
2

在此示例中,3.繪圖的點顏色(藍色)與測試輸出(綠色)不同 - 爲什麼? (我的默認終端是淺綠色的,但它與比如png相同)gnuplot點顏色錯誤

plot [0:4]\ 
    '-' title 'pt1' with points pt 1,\ 
    2*x title 'lt1' with lines lt 1,\ 
    '-' title 'pt2' with points pt 2,\ 
    3*x title 'lt2' with lines lt 2 
    1 1 
    2 5 
    end 
    1 3 
    3 7 
    end 

通過改變情節,顏色變化的順序:

plot [0:4]\ 
    '-' title 'pt1' with points pt 1,\ 
    '-' title 'pt2' with points pt 2,\ 
    2*x title 'lt1' with lines lt 1,\ 
    3*x title 'lt2' with lines lt 2 
    1 1 
    2 5 
    end 
    1 3 
    3 7 
    end 
+1

爲什麼你的代碼看起來像某種奇怪的槍?你是否試圖將它與shell或其他東西整合?如果是的話,你可以嘗試武器。 –

+0

我可以重現你的發現,它確實對我來說看起來像一個錯誤。也許你想在開發網站[here](http://sourceforge.net/projects/gnuplot/)上報告。 – Woltan

+0

好的 - 謝謝。我會報告一個錯誤,除非有人很快解開了這個謎。 – hpekristiansen

回答

1

在SourceForge用戶sfeam給出了答案:

點類型不控制顏色。這是第三個情節,並且您沒有其他指示 ,因此它獲得了線型3(藍色)的顏色。

顯然的線路圖上的顏色由以往線 曲線的數量設置,而積點的顏色由以前所有 曲線的數量設置。 兩者都可以通過linecolor或lc來控制。