On Sun, Jul 05, 2009 at 09:15:24PM -0400, Hazen Babcock wrote: > > Hello, > > As of v10119 you can now specify the color table to use for color table > 0 or color table 1 as a command line argument to PLplot. For example: > > ./x01c -cmap0 /path/to/cmap0a.pal -dev xcairo > > Will load the cmap0a.pal file and use the information in that file to > initialize PLplot's color table 0 prior to plotting. Similarly: > > ./x01c -cmap1 /path/to/cmap1a.pal -dev xcairo > > Will load the cmap1a.pal file and use the information in that file to > initialize PLplot's color table 1 prior to plotting. > > As part of this effort the PLplot API has two new additions: > plspal0(filename) - Set the color table 0 palette based on the cmap0.pal > format file specified by filename. > plspal1(filename) - Set the color table 1 palette based on the cmap1.pal > format file specified by filename. > > Example .pal format files can be found in plplot-source/bindings/tk. > Hopefully this addition will make it easier for people to use their > preferred color scheme.
Hazen, Sorry for joining this thread rather late in the day, but I've just got chance to try this out. Firstly, I think it is a great idea, so thank you Hazen for implementing it. Some comments. 1) The .pal files in bindings/tk are pretty hideous! Can we get some better examples. I have some palettes I regularly use which I would be willing to donate... 2) When I tried to create a .pal file I realised that the current file format assumes that the position value is an integer in the range 0-100, whereas plplot actually uses a PLFLT in the range 0-1. This might not be significant for most purposes, but for example I sometimes use continuous colour scales with a narrow band of values picked out in a different colour, either for emphasis or for ensuring that values around zero are white. The resolution offered by the .pal files might not be sufficient and I would rather not saddle us with something now that might cause problems later on. I think the original reason was that tk provided poor float support. Let's not saddle the rest of plplot with that. Andrew ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel