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

Home » Public Forums » archive » color 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: Color question [message #24475 is a reply to message #19825] Wed, 04 April 2001 11:47 Go to previous messageGo to previous message
rkj is currently offline  rkj
Messages: 66
Registered: February 1996
Member
JD Smith (jdsmith@astro.cornell.edu) wrote:
: David Fanning wrote:
: >
: > R. Kyle Justice (rkj@dukebar.crml.uab.edu) writes:
: >
: > > I guess there is a difference between a plot and an image
: > > on a postscript device. Plots seem to use filled polygons
: > > (which give pure colors) while images appear to use pixels
: > > or dots.
: <SNIP>
: > > SET_PLOT, 'PS'
: > > DEVICE, Bits_Per_Pixel=8, /Color
: > > TEK_COLOR ; or create your own discrete colormap
: > > bar=BYTARR(200,1000)
: > > FOR i=0,999 DO bar(*,i)=i*9/1000
: > > TV, bar, /Device
: > > PLOT, INDGEN(10), Color=7, Charthick=3, Thick=5, /Noerase
: > > DEVICE, /Close


: The immediate solution is to use *only* those colors as appear in
: countours in the color bar.

: And no for loops are needed. You could write:

: bar=LINDGEN(200,1000)/(200*100)

: or dispense with the chicanery altogether and simply use:

: bar=1b#bindgen(10)
: TV, bar, 0,0,XSIZE=.5,YSIZE=4,/inches


: Using the /inches (or /centimeters) keyword to TV for postscript output
: is highly advised.

: I get the same pure yellow either way: #ffff00

: JD

I just tried the above code and noticed something very interesting.
If I use bar=1b#bindgen(10), then the plot colors come out correct
and pure. However, if I use bar=LINDGEN(200,1000)/(200*100), I get
the same problem I had before. But at least there is no FOR loop :-P

This is may be a printer specific thing. I don't know. But to be
on the safe side, a one-column array should be used. Plus using the
# operator looks better . . .

But many thanks to JD for solving the problem.

Kyle
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Color Question
Next Topic: Apple "Switched" spoof

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

Current Time: Sat Oct 11 13:18:17 PDT 2025

Total time taken to generate the page: 0.23245 seconds