Re: Plotting in color on a 24 bit display [message #4990] |
Tue, 29 August 1995 00:00 |
karsten
Messages: 2 Registered: January 1995
|
Junior Member |
|
|
jmcfee@dres.dnd.ca (John McFee) writes:
> I am trying to plot multiple graphs in different colors in IDL 4.0 on a
> Sparcstation 20 with a 24 bit display. My old programs, designed for an
> 8-bit display, do not work. As a first step, I ran the following very
> simple pro file to plot white on black:
> red = [1,0,0,1,1,0,.9,.7,1,0]
> green = [0,1,0,1,0,1,.9,.9,1,0]
> blue = [0,0,1,0,1,1,.7,.9,1,0]
> s = size(red)
> nct = s(1)
> erase
> bck_color = long(red(nct-1) + 256L*(green(nct-1) + 256L*blue(nct-1)))
> plt_color = long(red(nct-2) + 256L*(green(nct-2) + 256L*blue(nct-2)))
> d = findgen(100)
> plot,d,background=bck_color,color=plt_color,title='Simple plot'
> end
> and I just get a black screen. According to the manual - Users Guide
By default your 24-bit visual class is read-only. Therefore IDL cannot
change colors, you get a black screen. You have to change your visual class
to PseudoColor to make your program work. The easiest way to do so
is to add some lines
/* what visual class to use */
Idl.gr_visual: PseudoColor
/* how many colors */
Idl.colors: 200
/* # of bits of visual */
Idl.gr_depth: 8
in your .Xdefaults file.
For more informations read the section The X Windows Device.
You may find this section in the hyperhelp of IDl 4.0 under the topic
X windows device.
>> ....
------------------------------------------------------------ -------------
Karsten Held | Email: k.held@kfa-juelich.de |
Institut fuer Medizin (IME) | Telefon: +49 2461 61 5738 |
Forschungszentrum Juelich | Telefax: +49 2461 61 4770 |
D-52425 Juelich | |
--------------------------------------------------------- ;) ------------
|
|
|