On Wed, 29 Jun 2016, Allin Cottrell wrote:
On Tue, 28 Jun 2016, Sven Schreiber wrote:
> Am 28.06.2016 um 23:30 schrieb Allin Cottrell:
>
>> (2) --band-style wants either 1 or 2 arguments (comma-separated if you
>> give two). The first may be either "line", "dash" or
"fill", to
>> represent the band by enclosing lines or dashes, or by a shaded area.
>> The default, if this argument is omitted, is "line". The second is a
>> hexadecimal RGB color specification: for example 0xff0000 means red.
>
> Great stuff -- but would it be too much to ask that standard gnuplot color
> aliases were also recognized? (Like "grey", "blue" etc.)
Actually, since
> all this is passed to gnuplot, wouldn't this actually come at no cost?
> (Well, the gretl parser probably needs to be taught to accept the input?)
I agree this would be nice, however I'm inclined to leave it till after the
forthcoming release. [...]
Actually, a better way of handling this occurred to me. Instead of
storing long strings such as "dark-spring-green" we should convert
them to hex values on input. This requires that gretl knows the
mapping from gnuplot colornames to RGB values, but we'd have to know
that anyway for purposes of editing plots via the GUI (since we want
to show a sample of the currently specified color for each line).
So this is now in git. One point to notice regarding the band-style
option: if you want to accept the default of "line" for the band, but
change the color, you have to prepend a ',' to indicate that the first
field is skipped. (We didn't need this before, since hex RGB
specifiers are easily distinguishable as such.)
Examples:
--band-style=fill,orchid
--band-style=,orchid
--band-style=dash,"#dddddd"
--band-style=,"#dddddd"
--band-style=dash,0xdddddd
Note that when a color is given as "#RRGGBB" it must be quoted to
prevent '#' being interpreted as the comment character.
The list of recognized colornames can be seen via the gnuplot command
"show colornames". Or from within gretl:
<hansl>
eval readfile("(a)gretldir/data/gnuplot/gpcolors.txt")
</hansl>
One other comment: plots that use the --band option are not editable
via the GUI at present. The editor back-end will have to be extended
to cover such plots, and that won't happen before the forthcoming
release.
Allin