|
From: Philipp K. J. <ja...@ie...> - 2008-07-31 03:20:43
|
Thanks for your reply. What I hear you say here is this, I think: Gnuplot has a way to automatically select different fill patterns (which will work in B&W), and different fill colors (which require a color terminal). But gnuplot does NOT have a way to automatically select different monochrome fill densities. To achieve such an effect, I have to start hacking Postscript. I am not sure that an NTSC mapping is ideal, though. What we really would want is something that cycles through fill densities, in the same way that gnuplot cycles through line types. Alternatively, we could have user-defined "fill styles", and then gnuplot could cycle through those. This way, users can define either a set of color fill styles, or monochrome density fill styles (or any combination thereof), and gnuplot would cycle through those. (I have no idea how hard that would be, and I would not think it is high priority, though.) Best, Ph. On Wednesday 30 July 2008 19:05, you wrote: > On Wednesday 30 July 2008, Philipp K. Janert wrote: > > Let's say I am trying to generate histograms > > like this: > > > > set style fill solid > > set style histogram clustered > > set style data histogram > > plot "data" u 1, "" u 2, "" u 3 > > > > I get a plot of histograms, with each "bin" > > in a different color (red, green, blue). > > > > Now, I would like to export this to a monochrome > > Postscript terminal. I would expect that the colors > > are mapped to different levels of grayscale. > > > > Instead, all colors seem to be mapped to black > > (or very nearly black). > > > > Is there a way to achieve the kind of automatic > > color-to-grayscale mapping I envision, or is this > > currently not supported? > > The issue is that there are two uses of color. > > One is to create a palette that captures a continuous quantity. > To convert this to a monochrome plot you want a greyscale mapping, > and that's what the postscript terminals do if you select "mono". > > The other use of color is simply to differentiate object A from > object B. Here a greyscale is irrelevant, and you instead want > some mapping that makes the common colors maximally distinct from > each other. > > I suggest that a clever way to achieve the latter goal is to > in this case redefine the PostScript setrgbcolor operator so > that you get an NTSC (black-and-white TV) mapping of the colors. > One line in the PostScript prolog suffices for this, so local > modification without touching the gnuplot executable is very > easy. I've posted complete instructions several times, but > I don't seem to have saved a copy on my local disk. |