|
From: Hans-Bernhard B. <br...@ph...> - 2003-11-01 17:20:38
|
On Fri, 31 Oct 2003, Petr Mikulik wrote:
> > However, logically if you can
> > 'save rgbpalette <filename>'
> > you would expect to be able to restore it later using
> > 'load <filename>'
That's a pretty strong point against my "save" proposal. I'm hereby
retracting that proposal.
Given the way this would be used (write info to file with that can be
plotted later), it's more similar to what the table terminal does, really,
than to 'save'.
That is, unless you're prepared to save it in a format that's cleverly
designed to be usable both as a 'load'able script to restore that palette,
and as a plottable datafile (e.g. by having a pair of blank lines after
the 'load'able commands end with an 'exit' command, and then the actual
data.) Not entirely impossible, I guess, but could be tricky to
explain to users...
> Therefore, now I would propose the syntax
>
> show palette palette <n> {float | int}
>
> Without the float|int option, it would print the complete table as it prints
> now. With the option, it would print table of <n> rgb triplets either in
> range 0..1 or 0..255. The output would be sent to the file given by 'set
> print'.
In that case, the outline above wouldn't quite match the actual syntax.
It'd have to read one of these ways, instead:
show palette palette <n> { | float | int }
show palette palette <n> {{float | int}}
to indicate that {float|int} is optional.
Otherwise (and unless we follow through on that crazy idea I outlined
above....) I think this is a good way to proceed.
> Considering the option 'palette' of 'show palette', it's there for
> years.
Well, I guess what this shows is mostly that I haven't exactly spent large
amounts of time inspecting the whole pm3d subsystem. I'd have spotted
that earlier, otherwise ;->
--
Hans-Bernhard Broeker (br...@ph...)
Even if all the snow were burnt, ashes would remain.
|