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

Home » Public Forums » archive » Re: Plotting in color on a 24 bit display
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: Plotting in color on a 24 bit display [message #4990] Tue, 29 August 1995 00:00
karsten is currently offline  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 | |

--------------------------------------------------------- ;) ------------
[Message index]
 
Read Message
Previous Topic: IDL benchmark on PPC 604 Macs
Next Topic: Bug (still) in NR_QROMB, QROMB

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

Current Time: Wed Oct 08 19:39:30 PDT 2025

Total time taken to generate the page: 0.00378 seconds