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

Home » Public Forums » archive » window size
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: window size [message #58569 is a reply to message #58423] Fri, 01 February 2008 10:24 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Spon writes:

> Should this:
> ... XRange=[0:s[1]], YRange=[0:s[2]] ...
> perhaps be:
> ... XRange=[0,s[1]], YRange=[0,s[2]] ..?
>
> As it stands I can't run your code either.

Oh, right. I sometimes lose these error messages in
the IDL Workbench. :-(

No one you are having trouble. I just got new glasses
and I'm having some troblem adjusting. :-(

Here is code that works:

image = Loaddata(16)
s = Size(image, /Dimensions)
pos = [0.1, 0.1, 0.9, 0.9]
TVImage, image, Position=pos, /Keep_Aspect
Plot, [0,1], XRange=[0,s[1]], YRange=[0,s[2]], $
NoData=1, NoErase=1, XStyle=1, YStyle=1, Position=pos
Cursor, x, y, /Data, /Down & Print, Round(x), Round(y)

I've left the axis there, so you can see how it works
a little better. :-)

Cheers,

David
--
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
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: EMACS or IDL Workbench
Next Topic: county and urban shapefiles

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

Current Time: Sat Oct 11 08:08:17 PDT 2025

Total time taken to generate the page: 0.96440 seconds