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

Home » Public Forums » archive » Re: TVimage and PlotS
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: TVimage and PlotS [message #40781 is a reply to message #40780] Thu, 26 August 2004 06:15 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
James writes:

> Perhaps you can help me. The problem is - I want to display
> an 2D-image and then overplot the data using PlotS. It looks
> like that:
>
> ....
> TVIMAGE, image, POSITION=pos, /KEEP_ASPECT_RATIO
> PLOTS, X,Y, COLOR=100
> ....
>
> I tried to apply DATA or DEVICE keywords but without success.
> How to make the data perfectly fitted with the image ?

PLOTS is used to draw a line in a graphics window.
If you want to draw a line on your image, you have
to know where your image *is* in the window. Since
you used TVIMAGE to display your image, you *do* know
where it is. It is positioned in the window, in
normalized coordinates, according to the "pos" variable.

So I would try to draw lines on it in the same
normalized coordinates. For example, to draw a line
from the lower-left corner of the image to the
upper-right corner:

PLOTS, [pos[0], pos[1]], [pos[1], pos[3]], /Normal

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: TVimage and PlotS
Next Topic: linetool for measuring the distance between 2 points

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

Current Time: Sun Oct 12 10:45:12 PDT 2025

Total time taken to generate the page: 0.87706 seconds