gnuplot_curve_styles



On 10/31/07, Jaime Villate <villate at fe.up.pt> wrote:

> I don't like the idea of a huge array with global options. The new
> options I've implemented (box, legend, xlabel, logx, style, ...) are not
> in plot_options. They should be given explicitly in each plot2d command.
> Perhaps we should rethink this point?

I'm not really all that crazy about the big array either.
But I think there is some value in collecting plot options in one place.

There exists a function named defstruct (invented by RJF a
few years ago and imported by me sometime later) which might
be helpful here. We can define a plot options structure, e.g.

defstruct (plot_options1 (foo=1, bar=2, baz=[x, y]));
my_options : new (plot_options1);
my_options at foo;
 => 1
my_options at baz;
 => [x, y]
my_options at bar : 7;
my_options;
 => plot_options1(foo = 1, bar = 7, baz = [x, y])

A plotting function could observe a global plot options structure
or accept a plot options structure as an argument (and perhaps
accept isolated options as well). Something to consider.

best

Robert