|
From: Daniel J S. <dan...@ie...> - 2016-09-30 04:44:07
|
I've noticed that enhanced text mode cannot control the color of a
substring. Just as a brainstorming exercise, has anyone thought of
adding such a thing in some way? In principle it's pretty
straightforward: just change terminal color at various points when
processing the string. But I've a feeling implementation may not be so
easy. Approaches might be:
1) Add some color code extension to the enhanced text processing. The
code word may not agree with some "standard" described in ps_guide.ps,
but I don't see why that should be a problem. The problem is that all
terminal drivers would need to be modified to process that code word.
2) Create a tex-processing feature, which is similar to enhanced text
(and could use much of the same code), but it would allow using things
like "{\color[rgb]{.3 .7 .3}Hello} World". Of course, this is no simple
task, but I'm just thinking long term wish if there is no better approach.
3) If there were some way of getting the position at which one
label/string ends, then one could concatenate strings. I've a feeling
this isn't possible. I mean, one has to effective do the plot to get
the string-end position, which would be clumsy.
4) However, #3 in theory could be implemented as "not lifting pen".
Does gnuplot core code have knowledge of this? That is, can it do one
label, not lift the pen, then continue with another label? If so, the
following concept might work:
set label 1 "{/Times:Bold hello}" textcolor "red" at 1,2
set label 2 "world^3" textcolor "blue" after label 1
Or, maybe just allow multiple substring specifications, but only a
single "at x,y":
set label 1 "{/Times:Bold hello}" textcolor "red" "world^3" textcolor
"blue" at 1,2
Would that work easily internally? Or is there still a problem as far
as laying out string alignment?
Dan
|