2017-09-15 55 views
1

我想使用Gnuplot來創建折線圖。每條線都用不同的顏色表示。我想要的是這把鑰匙與線條顏色具有相同的顏色。這就是我現在所擁有的,current version。是否可以設置文本'線2'的顏色爲橙色,'線3'的顏色爲紅色等?Gnuplot線和關鍵顏色

這是我在GP文件中寫道:

set xlabel'x-axis'; \ 
set xrange[0:25];\ 
set ylabel 'y-axis';\ 
set yrange [2:9];\ 
set key left top; 
p 'test.dat' using 1:2 w linespoints lw 5 lc rgb '#aadc32' pt 17 title 'Line 1' ,\  
'test.dat' using 1:9 w linespoints lw 5 lc 'orange' lt 1 title 'Line 2',\ 
'test.dat' using 1:6 w linespoints lw 5 lc 'red' lt 8 title 'Line 3',\ 
'test.dat' using 1:7 w linespoints lw 5 lc 'violet' pt 6 title 'Line 4',\'test.dat' using 1:8 w linespoints lw 5 lc rgb '#b5367a' pt 19 title 'Line 5',\ 
'test.dat' using 1:3 w linespoints lw 5 lc 'cyan' pt 9 title'Line 6',\ 
'test.dat' using 1:4 w linespoints lw 5 lc 'blue' lt 9 title 'Line 7',\ 
'test.dat' using 1:10 w linespoints lw 5 lc rgb '#1c1044' lt 5 title 'Line 8',\ 

太謝謝你了。

回答

1

不幸的不是。情節標題沒有(現在,gp5.2pl0)識別「textcolor」說明符。

plot x lw 3 lc rgb "blue" title "x" tc rgb "blue" # doesn't work 

只能打印一個空的(」「)的情節標題,並配有彩色標籤

set label 1 at 8,1 "bluetitle" tc rgb "blue" 

這需要擺弄一些與標籤的位置,當然疊印它。

您可能會在https://sourceforge.net/p/gnuplot/feature-requests/上提出功能請求