Re: color plot in postscript [message #65863 is a reply to message #65756] |
Tue, 24 March 2009 06:19   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Vince Hradil writes:
> I ran into this just last week. I wanted to use David's histoplot to
> have a "polyfilled" histogram, and I wanted the histogram to be shaded
> the same as the color image I was histogramming. http://yfrog.com/0erc3191=
> c5p
> I tried to set the polycolor keyword to, say, lindgen(256), but alas
> it wanted names. I ended up writing it myself - but I did alter
> histoplot.pro to check if polycolor is a string type or not. If it is
> a string (or string array), I let it call fsc_color(), otherwise I use
> the index.
Yikes! I ran into this situation just yesterday myself, although
I solved it in a slightly different way. I modified FSC_COLOR
to know the "names" of the colors in the current color table.
I gave them the names '0', '1', '2', ..., '255'. Thus, I could
specify a range of colors like this:
Histoplot, ..., POLYCOLOR=SIndgen(10)
Unfortunately, this only really works if I work with
color decomposition on (my usual state). I haven't yet
figured out how to do this in a completely device-independent
way. (Although I just had another idea about it while writing
this note.) Stay tuned, I guess. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|