Re: color plot in postscript [message #65756 is a reply to message #65677] |
Fri, 20 March 2009 06:58   |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Mar 20, 8:22 am, Dave Klassen <klas...@rowan.edu> wrote:
> On Mar 20, 8:47 am, David Fanning <n...@dfanning.com> wrote:
>
>
>
>> It is truly amazing with what we put up with sometimes.
>> But, writing the wrapper would irritate me even more.
>> Why am I supporting this stupid color index way of
>> specifying color when I don't use it anymore, ever,
>> unless under duress and because IDL forces me to?
>
> Well, to play devil's advocate here, using a color index is good
> for doing multiple plots of differing colors.
> plot, x, y[0,*], /nodata
> for i=1,7 do oplot x, y[i,*], color=i
>
> Of course, I realize one could do
> clrvec=['Red','Blue','Green',...]
> and then use
> for i=1,7 do oplot x, y[i,*], color=clrvec[i]
> to get the same result.
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/0erc3191c5p
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.
|
|
|