From: Alan W. I. <ir...@be...> - 2004-11-12 07:27:24
|
On 2004-11-12 07:34+0100 Lehmann, Eckhard {TR-I~Penzberg} wrote: >> >> Our R, G, and B values are stored in 8-bit unsigned integers >> so our fundamental colour limit is we have 24 bits of colour >> with no transparency channel. It's been quite a while since I >> did a bunch of experiments with the png, jpeg, and gif >> devices associated with the gd.c device driver, but I recall >> they supported a large number of different colours and >> perhaps even up to our theoretical maximum of the full 24 >> bits. I doubt the other older devices go that high, but if >> you needed more colours for them, I don't think it would be >> that difficult to change them. > > That should suffer, of course. It seems that I haven't figured out how > to set the colors yet, I'm still using the predefined plcol0 palette > with 16 colors, the documentation did not offer to me a real alternative > (except that it should be possible to change these colors... But how?). > May I ask for a short example how to do this from within Tcl? This is documented in http://plplot.sourceforge.net/docbook-manual/plplot-html-5.3.1/color.html . "For more advanced use it is possible to define an arbitrary map0 palette of colors. The user may set the number of colors in the map0 palette using the command-line ncol0 parameter or by calling plscmap0n. plscol0 sets the RGB value of the given index which must be less than the maximum number of colors (which is set by default, by command line, by plscmap0n, or even by plscmap0). Alternatively, plscmap0 sets up the entire map0 color palette. For all these ways of defining the map0 palette any number of colors are allowed in any order, but it is not guaranteed that the individual drivers will actually be able to use more than 16 colors." If you click on any of the command links from the above URL you will get complete documentation of the C argument lists which are straightforward to transform to tcl syntax using the C and tcl examples as a transformation template. Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |