|
From: Ethan A M. <eam...@gm...> - 2015-04-13 05:55:56
|
On Sunday, 12 April 2015 10:18:02 PM Patrick Alken wrote: > I am trying to use 'set palette maxcolors 5" with the "moreland.pal" > palette file found at: http://www.gnuplotting.org/data/moreland.pal. > > Using the script: > ---- > set pm3d map > load 'moreland.pal' > set palette maxcolors 5 > splot x+y > ---- > > In gnuplot 4.6, this makes a nice discrete-color plot as intended. > However in v5.0 the plot has a continuum of colors regardless of the > "maxcolors" setting. There was a change in handling "maxcolors", but the change came several years ago. It is not connected to version 4 / version 5. I think the new behavior was first introduced in 4.4.3 (Mar 2011) and tweaked a bit in later versions. The change is that terminals with full RGB color support will always give you any explicitly requested color. That is, "maxcolors" will determine how many subdivisions are made for an interpolated palette, e.g. set palette defined (0 "red", 1 "blue") maxcolors 5 test palette But if you request, say, 20 explicit color ranges you will get all of them even though you said "maxcolors 5" > In 5.0, set palette maxcolors does work for the default palette, but not > moreland. Is there a reason why this is disabled for moreland palette? You provided a file containing 256 explicit colors, so that's what you got. I'm not sure why you are seeing different behavior with the x11 terminal. I wouldn't have expected that. Gnuplot version 5 does contain a new palette option that is in somewhat the same spirit as the Moreland schemes you refer to. It is obtained by "set palette cubehelix" See "help cubehelix" Full paper here: D A Green (2011) http://arxiv.org/abs/1108.5083 Ethan |