comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL Colorbar generation question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL Colorbar generation question [message #49220 is a reply to message #49146] Thu, 06 July 2006 09:16 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
britneys@ucla.edu writes:

> I do use direct graphics, whoops on the graphics object! This is how
> the window is called:
>
> SET_PLOT,PLATFORM
> !P.FONT=0
> DEVICE,DECOMPOSE=0,RETAIN=2
> !P.BACKGROUND=255 ;background color=white
> WINDOWCOUNT=0
> WINDOW,WINDOWCOUNT,xsize=XWIND,ysize=YWIND,title=VERSION
> ERASE
>
> Okay, so back to your colorbar routine, it will automatically use my
> self-defined color table? I used the following call:
>
> colorbar = Obj_New("COLORBAR", Range=[0,1000], Format='(I4)', $
> Title='Values')
> colorbar->SetProperty, Position=[0.1, 0.75, 0.9, 0.80], /Draw
> colorbar->Draw
>
> is this correct?

Yes, assuming you have loaded a 256-color color table before
this call, this will work perfectly.

> Also, when i output the file to a ps, the colorbar,
> instead of being a smooth color transition ends up as several boxes of
> different colors instead. Any ideas as to why this might occur?

You didn't set BITS_PER_PIXEL=8 in the PostScript device. :-)
Thus, you are only seeing 16 possible colors. I'd use PSCONFIG
to configure your PS device. Then this problem will be relegated
to the past forever.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDLWAVE Mac OS X
Next Topic: negation operator

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 00:58:22 PDT 2025

Total time taken to generate the page: 0.55463 seconds