From: Alan W. I. <ir...@be...> - 2004-05-17 14:22:28
|
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. Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the PLplot scientific plotting software package (plplot.org), the Yorick front-end to PLplot (yplot.sf.net), the Loads of Linux Links project (loll.sf.net), and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |