From: Ethan A M. <merritt@u.washington.edu> - 2008-07-31 02:05:14
|
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. -- Ethan A Merritt |