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

Home » Public Forums » archive » Postscript-problem... :((
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: Postscript-problem... :(( [message #10357 is a reply to message #10288] Mon, 17 November 1997 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Joel D. Offenberg (offenbrg@fondue.gsfc.nasa.gov)
offers some good advice when he writes:

> davidf@dfanning.com (David Fanning) writes:
>
>>> - something goes wrong with the colormap.
>>> on the screen I have colors from blue to red, on the ps only from
>>> blue to yellow...??
>>> whats going wrong..?
>
>> Uh, probably you didn't do *exactly* what I suggested in my
>> earlier message and reload those color vectors after you got
>> into the PostScript device. :-)
>
> Actually, I've seen this before---when you draw things in a TV window and
> use the color tables, the output is truncated to the number of colors
> available (which is typically less than 256, since some will be taken up
> by the system, unless you have a 24-bit graphics card). However, that isn't
> the case when you are using PostScript, so things may end up non-linear.

Exactly. This is certainly what was happening to Astrid Kuhr. That
is why I advised him to get the color table vectors *before*
he went into the PostScript device:

TVLCT, r, g, b, /Get

And to restore them *exactly* the way he found them once
he got there:

Set_Plot, "PS"
TVLCT, r, g, b

Combined with his TVRD(), this would result in PostScript
colors EXACTLY like he saw on the display.

> The test is to see if "Print, !d.N_colors" before you start your tvrd gives
> you 256. If it doesn't, you have several options to get it right. The
> easiest way is to pad out the R,G,B vectors to have 256 elements each,
> then "tv, IMAGE < n_colors"
> where n_colors = !d.N_Colors from before you started with the TVRD.

I'm not sure this is the best way if you want to view
your data correctly. I think the best way is usually to scale
your data to the number of colors you have on the display
and make sure you use *exactly* the same color table vectors
(i.e., with same number of elements) both on the display and
in your PostScript file.

Cheers,

David

P.S. In any case, Astrid told me he got better results when
he followed my directions more closely. :-)

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to get values from a widget
Next Topic: Re: when will RSI come out with a scaledDown version of IDL?

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

Current Time: Fri Oct 10 19:14:06 PDT 2025

Total time taken to generate the page: 0.40376 seconds