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

Home » Public Forums » archive » Re: Why postscript colors are same as screen?
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: Why postscript colors are same as screen? [message #70839 is a reply to message #70837] Mon, 10 May 2010 04:58 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mrunmayee writes:

> I have an array, say data[311,550]. It contains only 0's and 1's and I
> am trying to display it. When I use
> IDL> tvscl, data
> I get output on the screen with 0's painted with black and 1's with
> white. Exactly what I want. When I do
> IDL> set_plot,'ps'
> IDL> tvscl, data
> IDL> device,/close & set_plot,'x'
> I get output - again 0's are painted black and 1's are painted white.
> I thought, the default color table is reversed when we plot in
> postscript. Which is why plot is balck-background-white-foreground on
> screen but reversed in postscript. But that's not what I am getting
> here. Am I missing something here? When it comes to images, I am very
> very unskilled.

The PostScript color table isn't reversed. It only
*acts* as if it were reversed in certain circumstances,
of which this isn't one of them.

Cheers,

David

P.S. In case you were wondering, the PostScript device
is designed as a test. If the novice IDL programmer
can overcome its inconsistencies to produce a plot that
is even just a reasonable facsimile to what they expected
to get, the programming gods will allow you to proceed
to the next level of the game, which is understanding
the colors used in filled contour plots. :-)



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: passing an idl function to a c-code ?
Next Topic: Polygon Smoothing

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

Current Time: Sat Oct 11 04:22:58 PDT 2025

Total time taken to generate the page: 1.36365 seconds