Re: color plot in postscript [message #65755 is a reply to message #65677] |
Fri, 20 March 2009 07:14   |
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.
Well, OK, here is an excellent counter-argument to my
general color philosophy. :-)
Over the weekend, though, I went to the trouble of
accommodating EVERYONE's way of specifying color
in my discrete color bar program. (Still haven't
seen that check, Vince!) That may be the last time
I try to do that. If you want to do it the old
way, as Vince proves, two lines of code and you
are back in business.
Although I am pretty sure Vince is not allowing for
the fact that you have to know what device you are
on, etc., if you are going to use indexed color
successfully everywhere. It is this last part that
creates nightmares for code developers. If I were
writing code only for my own use, life would be a
LOT simpler. :-)
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.")
|
|
|