From: Arjen M. <arj...@wl...> - 2004-05-19 06:52:03
|
"Alan W. Irwin" wrote: > > On 2004-05-17 08:37+0200 susto susto wrote: > > > Hello everyone!!! > > > > I have been working with plplot to get some plots. I > > need to get those plots in black and white. I have > > used the code you can find in the documentation: > > > > PLFLT i[2], r[2], g[2], b[2]; > > > > i[0] = 0.0; > > i[1] = 1.0; > > r[0] = 0.0; > > r[1] = 1.0; > > g[0] = 0.0; > > g[1] = 1.0; > > b[0] = 0.0; > > b[1] = 1.0; > > > > pls->scmap1l(1, 2, i, r, g, b, NULL); > > > > This work perfectly to the xwin driver and I get the > > plot I want, but when I use the ps driver I get also a > > black and white plot but the colors are interchange. I > > mean if you have a dark gray in xwin you get a clear > > one in ps. > > > > Does somebody know which could be the reason??? I > > execute the same code with both so I do not know why > > it works like that. > > The reverse of the gray scale is by design in ps. The ps device is used to > obtain (by default) black lines on white background for research plots. But > ordinarily, just use the psc device (NOT the ps device), and it should give > you identical colours (or gray scale in this case) to -dev xwin. > > I also saw Arjen's reply about patching the code, but I don't think > such a drastic measure will be required in this case. > Forget my earlier replies: I had started off on a wrong track when I found that the PS driver was not producing grayscales. The thing is that I thought that for a black/white printer, you need a black/white PostScript file or whatever format the printer takes. This may have been true half a decade ago, when printers were not always capable of PostScript, but nowadays it is not an argument. To summarise: If you need a truly black/white output file (coloured lines that are turned into grayscale can be difficult to view), use the ps driver. In all other cases: use the psc driver. Regards, Arjen |