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

Home » Public Forums » archive » Re: More Q's on TV and Postscript
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: More Q's on TV and Postscript [message #2708] Wed, 31 August 1994 05:28
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
steinhh@amon.uio.no (Stein Vidar Hagfors Haugan) writes:

> In article <340vtmINN5tv@lanews.la.asu.edu>, rouse@sevens.la.asu.edu (Roger Rouse) writes:

> |> 3. Wouldn't it be nice if TV understood all of the !p variable especially
> |> !p.multi. Has anyone developed or know of a procedure, say PTV, that
> |> works like PLOT (or PLOTS) but draws an image instead of a graph? If
> |> you've only one picture then things go smoothly, but if you what a
> |> graph with a picture next to it or some other combination things get
> |> complicated.

> I'll leave this to Bill :-) (Thompson)

I had responded privately to this, but now that my name has been taken in vain
(;^)) I will point out that I have a routine to do this called PLOT_IMAGE which
can be obtained via anonymous ftp from idlastro.gsfc.nasa.gov in the directory
contrib/thompson/image_display, or as a URL

ftp://idlastro.gsfc.nasa.gov/contrib/thompson/image_display

Look at the README file and the LaTeX file image_display.tex (in
contrib/thompson) for more information. The software in this directory also
addresses some of the other points raised by the original post.

Bill Thompson
Re: More Q's on TV and Postscript [message #2709 is a reply to message #2708] Wed, 31 August 1994 03:56 Go to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <340vtmINN5tv@lanews.la.asu.edu>, rouse@sevens.la.asu.edu (Roger Rouse) writes:
|> Now that I can actually see the postscript output I've three more questions.
|>
|> 1. How do I get the picture to be black on white? If I try this trick
|>
|> a(where(a eq 0B)) = 225B
|>
|> then any plots that are with the picture disappear since plots are
|> done in black. This also makes the picture look very different! I've
|> also tried reloading the color arrays after set_plot,'ps' with and
|> without giving /COLOR in the call to DEVICE. What's the catch?

It's usually best done by redefining color 0 to be white, and color 255
to be black, use "TVLCT" (I think), first to get the color table,
modify it, and then put it back. I.e.:

tvlct,r,g,b,/get_.... ; (NOT sure about the actual wording here, butt..)
r(0)=255 & g(0)=255 & b(255)=255 ; Color 0 has full intensity -- white
r(255)=0 & g(255)=..... ; Color 255 has no intensity -- black
tvlct,r,g,b ; Put color table back

You might not have 255 colors available, so ther might be some few changes..

|>
|> 2. I would also like to use PLOTS to draw circles and things on the picture.
|> How can I position them correctly given that the position and size of the
|> picture is specified in centimeters (or inches) not NORMAL, DATA, or even
|> DEVICE coordinates?
Use:

DEV_COORD = convert_coord([x,y],/data,/to_device) ; Put something at [x,y]
plots,x,y,/device

You could, of course, also use /to_normal and /normal..

|>
|> 3. Wouldn't it be nice if TV understood all of the !p variable especially
|> !p.multi. Has anyone developed or know of a procedure, say PTV, that works
|> like PLOT (or PLOTS) but draws an image instead of a graph? If you've only
|> one picture then things go smoothly, but if you what a graph with a picture
|> next to it or some other combination things get complicated.

I'll leave this to Bill :-) (Thompson)


|>
|> I think that I can do what I want in the window, but the conversion to
|> postsrcipt does not reproduce what's in the window. I've tried using
|> TVRD but then you have the black-on-white problem again.
|>
Generally, this is not a good idea. Make your plots/tv statements as device
independent as possible, and use them (possibly slightly rewritten) separately
for PS devices. A piece of paper has a lot more pixels than a computer screen!


Stein Vidar
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL Solar coordinate transformations
Next Topic: Re: IDL mathematics

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

Current Time: Wed Oct 08 19:16:58 PDT 2025

Total time taken to generate the page: 0.00662 seconds