however i can't appropriately modify the textcolor in the legends. i
was hoping something like the following will work
plot 'data1' u 1:2:3 w labels tc rgb 'red' t tc rgb 'red' 'red'
which obviously does not work :(
any advice to get this working?
Unfortunately it's not possible to set different colors for different
key entries. You can set a global key text color that'll affect all
entries but that's it.
However, you can still get what you want with a set of manually
positioned labels:
unset key
set label 1 'red' at graph 0.8,0.8 tc rgb 'red'
set label 2 'blue' at graph 0.8,0.75 tc rgb 'blue'
plot 'data1' u 1:2:3 w labels tc rgb 'red', 'data2' u 1:2:3 w labels
tc rgb 'blue'
Péter Juhász
Yes.
The command "set key tc variable" will assign each key entry to be the
same color as the corresponding plot. Unfortunately for your particular
case, the color is taken from the line color rather than from the
text color. Nevertheless, you can force this by defining the text color
in terms of a line color:
set style line 1 lc rgb "red"
set style line 2 lc rgb "blue"
set style increment user # track line styles rather than line types
set key tc variable
plot 'data1' with labels tc ls 1, 'data2' with labels tc ls 2
In the development version of gnuplot (4.5) it is easier, because you can
reassign the colors of the linetypes themselves rather than defining
separate styles.
I think this needs to be documented.
Péter Juhász
ps. Merry Christmas!
>
>> The command "set key tc variable"
>
> I think this needs to be documented.
It's in the first paragraph of "help key samples"
Ethan