|
From: Ethan A M. <merritt@u.washington.edu> - 2003-11-01 19:47:25
|
On Saturday 01 November 2003 09:11 am, Hans-Bernhard Broeker wrote:
> On Fri, 31 Oct 2003, Petr Mikulik wrote:
> > 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'.
If output is to go to the 'set print' device, then why not use a
print command, rather than a show command?
Functionally it would appear as if there were an internally
defined function palette(n), although in practice I think we
would have to catch the keyword "palette" explicitly in the
command parser rather than trying to actually implement it
as a function that prints its output. So the command sequence
would become
set print '<palettefile>'
print palette(n)
As to the float/int option, can't we just write both into the file?
Each line would have an integer triplet and a float triplet.
Very similar to the current output of 'show palette palette <n>'
but less wordy. I don't see anything to be gained by splitting
this into two separate output options.
So output of 'print palette(n)' would be 8 numbers per line:
<index> <grey value> <r> <g> <b> <ir> <ig> <ib>
Actually, I'd suggest emitting a comment line first that
states the generating function used to create the palette.
> > Considering the option 'palette' of 'show palette', it's there for
> > years.
There are many examples in gnuplot of the output of 'show'
not matching the output of 'print'. So I don't think it would
introduce any new confusion to have both show and print
exist for palette output.
--
Ethan A Merritt
Department of Biochemistry & Biomolecular Structure Center
University of Washington, Seattle
|