|
From: Petr M. <mi...@ph...> - 2013-02-27 09:43:54
|
On Tue, 26 Feb 2013, Ben Abbott wrote:
> On Feb 26, 2013, at 7:38 AM, Petr Mikulik wrote:
>
>>> The toolkit uses gnuplot's key box to produce the legend. Is there a way to
>>> change the color of the entries for the key labels in gnuplot?
>>
>> It can be changed by this command:
>> set key textcolor rgb "#FF00FF"
>
> Is it possible to specify the color of the text for each key independently?
No. You can either have the legend title and all keys of the same colour, e.g.
set key textcolor rgb "black"
set key textcolor rgb "#FF00FF"
or variable, i.e. the legend title is black and all keys have colour of their
linetype:
set key textcolor variable
I've found an old mail (by me :-) from June 2002:
---
set time ... textcolor ...
set tics ... textcolor ...
set key ... textcolor ...
set key ... title ... textcolor ...
It may be further nice to implement an option for 'set key' to specify
whether labels of particular plots are black or specified textcolor
(all the same), or they have the same color as their linetype, e.g.
set key {labels {ltcolor | defcolor | textcolor ...}}
---
Note: The case of "set tics textcolor" has been implemented, "set time
textcolor" not, "set key textcolor" only as a global option for the title and
all keys, see above.
What should be the syntax? E.g.
plot x*x title "sqr" textcolor "blue", x title "lin" textcolor variable
set key textcolor ... --- colour for all as currently
set key title ... textcolor ... --- colour for the title only
Actually, the most general solution for multi-colour enhanced text would be:
set label "colours {/#FF0000 red} and {/#00FF00 green} and {/#0000FF} blue"
However, that would require a patch to all terminal drivers (but I wonder if
this would be technically possible) ... maybe only to allow it as the first
word of the enhanced syntax, thus without disturbing terminals:
set label "{/#FF0000 red label}"
---
PM
|