Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: An IDL cron...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 17 of 18 Topic 5405 of 6261
Post > Topic >>

Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all sorts

by "kathryn.ksm@[EMAIL PROTECTED] " <kathryn.ksm@[EMAIL PROTECTED] > Feb 8, 2008 at 10:02 AM

On Feb 8, 10:52 am, David Fanning <n...@[EMAIL PROTECTED]
> wrote:
> Katheryn writes:
> > So, I am still a little confused.  The reason for using a color table
> > in the first place is so that I can do the neat trick of scaling the
> > colors in my plots to represent some arbitrary distribution of values
> > over an arbitrary range, which is the purpose of the actual version of
> > this little plotter.  Is there a way to do that either with FSC_COLOR
> > or some version of color tables in the Z buffer and get the colors I
> > really want out?
>
> You load color tables in the usual way with LOADCT,
> although you might want to become acquainted with the
> keywords NCOLORS and BOTTOM as you gain more experience
> with this.
>
> Your problem is that the color table you want to
> use to display your data (33) is about the worst possible
> choice to use in drawing a plot, since--as you see--
> it typically results in a blue background with red
> axes. Yuck!
>
> The code I wrote for you yesterday loads some plot
> drawing colors into the color table, draws the plot
> with something sensible, then loads color table 33
> to draw your data. That is one way to handle the
> situation. The other way, if you insist on using
> indexed color, and--alas--you have to in the PostScript
> device, is to divide your color table up into "plot
> drawing colors" and "data display colors".
>
> For example, you could do this:
>
>    LoadCT, 33, NCOLORS=250
>    TVLCT, FSC_COLOR(['white', 'navy', 'indian red'], /TRIPLE), 250
>
> This gives me 250 "display colors" and three "plotting colors",
> while are loaded in indices 250, 251, and 252. Now, all I have
> to do is make sure I scale my data into only 250 values, so I
> can get the correct color display, and I am good to go:
>
>    !P.Multi=[0,2,1]
>    data = BytScl(dist(256), Top=249)
>    Plot, findgen(11), color=251, background=250, /nodata
>    Oplot, findgen(11), color=252
>    TVImage, data
>    !P.Multi = 0
>
> This assumes you are using indexed color, of course. If you
> wanted to do this in a color set-up independent way, you would
> use FSC_COLOR to specify the colors on your plot commands.
> For example, if I wanted my program to display the correct
> results on my display (whether I was using decomposed color
> or not) and in PostScript and in the Z-buffer and ... wherever,
> I would write the code like this:
>
>    !P.Multi=[0,2,1]
>    data = Bytscl(dist(256))
>    Plot, findgen(11), color=fsc_color('navy'), $
>        background=fsc_color('white'), /nodata
>    Oplot, findgen(11), color=fsc_color('indian red')
>    LoadCT, 33
>    TVImage, data
>    !P.Multi = 0
>
> Notice here, I don't have to restrict the number of colors
> for my data, I can use all 256 I have loaded.
>
> A handy way to check which colors you have loaded in your
> color table is to use CINDEX, another Coyote Library program
> you have downloaded by now. :)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Se****e ma de ni thui. ("Perhaps thou speakest truth.")


David,

There went the 'aha'.  I get it now... I tried out something along the
lines of your suggestions (assigning the colors for the plot
separately from those used to represent data) and that works - even
with cron.  I am actually not using FSC_COLOR but I noticed the
recently-added CRONJOB option, which is awesome.  I managed to get
things to work with the COLORBAR using the COLOR option instead of
ANNOTATECOLOR.  I haven't tested it yet, but I had a feeling that the
FSC_COLOR call in the ANNOTATECOLOR might cause problems in cron jobs
if the CRONJOB keyword isn't propagated through somehow.  But anyway,
I just made my first lovely color image using cron.  Phew!  Thanks
gazillions,

Kathryn
 




 18 Posts in Topic:
An IDL cron job, true color plots, Xvfb, Z-buffer, and all sorts
"kathryn.ksm@[EMAIL   2008-02-07 02:06:25 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
Spon <christoph.blau@[  2008-02-07 03:10:53 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
"kathryn.ksm@[EMAIL   2008-02-07 05:21:12 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
Spon <christoph.blau@[  2008-02-07 06:02:18 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
David Fanning <news@[E  2008-02-07 07:58:05 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
Spon <christoph.blau@[  2008-02-07 06:16:22 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
"Haje Korth" &l  2008-02-07 09:58:24 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
Spon <christoph.blau@[  2008-02-07 08:31:59 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
David Fanning <news@[E  2008-02-07 09:55:55 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
David Fanning <news@[E  2008-02-07 10:19:12 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
Spon <christoph.blau@[  2008-02-07 09:49:22 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
David Fanning <news@[E  2008-02-07 11:15:11 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
"kathryn.ksm@[EMAIL   2008-02-08 07:42:43 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
David Fanning <news@[E  2008-02-08 09:06:27 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
"kathryn.ksm@[EMAIL   2008-02-08 08:25:36 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
David Fanning <news@[E  2008-02-08 09:52:41 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
"kathryn.ksm@[EMAIL   2008-02-08 10:02:23 
Re: An IDL cron job, true color plots, Xvfb, Z-buffer, and all s
David Fanning <news@[E  2008-02-08 11:18:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 21:00:50 CDT 2008.