|
From: Petr M. <mi...@ph...> - 2003-10-31 14:52:47
|
> > And if you really suspect confusion, you could still use a different
> > name than 'palette' to distinguish it from 'show palette'. Say 'save
> > rgbpalette'.
Then docs would have to be like
save {<option>} '<filename>'
save rgbpalette '<filename>' <n> {scale <scale> {int}}
> However, logically if you can
> 'save rgbpalette <filename>'
> you would expect to be able to restore it later using
> 'load <filename>'
> This suggests to me that the output of the save command
> should be formatted such that it is acceptable to 'load'.
No, it is to be loaded as
set palette file 'blabla.dat'
Thus, it is not very coherent with other save/load commands.
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'.
What do you think about this?
Considering the option 'palette' of 'show palette', it's there for years.
But that's just showing command, thus obviously not used in scripts. It
could be renamed to 'show palette rgbpalette' or 'show palette rgbtable' if
there are some votes for this change, or for any other better name.
> Also, would it not be equally (or even more) useful to have a
> 'test rgbpalette'
> that displays in the plot window an indexed array of the
> palette colors?
That would be really nice. It could be done most easily like that:
- save rgb table with 256 samples into a temporary file
- plot it by a call to "do_string"
---
Petr Mikulik
|