Hi Joey, I spent to much time to prepare my answer with an advertisement... But I send my post even though the problem is already solved. ;-) I was about to say that I can't think that PGPLOT's plot_image is able to perform such a task, but I found that it indeed is! ISIS' PGPLOT module offers the S-Lang function _pgctab as a wrapper for http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCTAB. You can use it, e.g., as _pgctab([0,1], [0,.8], [0,0], [0,1], 1, .5); to ramp red from 0 to .8, keep green at 0 and ramp blue from 0 to 1, intentionally avoiding the (r,g,b)=(1,0,1) pink... ;-) Through this exercise, I also learned the solution to another problem I had for a long time: I could not use plot_image to write ps files, and I had always thought PGPLOT is to blame. But it actually works when I call this _pgctab or just set_palette(0); after open_plot! Did anybody else have this problem, too? The way I would usually address this task (and still will, despite that I now know that PGPLOT could do it...) is to write a png file in the colors I want and then use John Davis' SLxfig module to include it into *a wonderful plot*, with code as simple as variable p = xfig_plot_new(); p.world(xmin, xmax, ymin, ymax); p.plot_png(pngfilename); p.xlabel(xlab); p.ylabel(ylab); p.render("a_wonderful_plot.eps"); % which ever p.render("a_wonderful_plot.png"); % you like p.render("a_wonderful_plot.pdf"); % most Although SLxfig is still pre-version 0.2, I think it is already quite powerful. If you want to convince yourself: John has nice examples on http://www.jedsoft.org/fun/slxfig/examples.html, and I've recently put those from the source code itself on http://pulsar.sternwarte.uni-erlangen.de/hanke/science/X-ray/ISIS/SLxfig/. (You can also find a link to my institute's wiki there, which contains a few further examples.) Last but not least, I'd like to advertise Thomas' accretion disks in http://adsabs.harvard.edu/abs/2010MNRAS.409.1534D. Cheers, Manfred, indeed a passionate SLxfig user... :-) P.S. A happy new year to all ISIS users! Joseph Neilsen wrote: > Hi, > > I'm wondering if there is a way to use plot_image to make images of an > arbitrary color. I have a 2D Gaussian that I'm trying to display, and I'd > like to do it in various levels of purple (i.e. purple fading to black). > set_palette allows you to select the color table, but not to just pick a > color. > > Is there a way to do what I'm looking for? > > Thanks! > > Joey ---- You received this message because you are subscribed to the isis-users list. To unsubscribe, send a message to isis-users-request_at_email.domain.hiddenwith the first line of the message as: unsubscribeReceived on Sun Jan 02 2011 - 13:35:39 EST
This archive was generated by hypermail 2.2.0 : Sun Jan 02 2011 - 13:36:53 EST