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

Home » Public Forums » archive » Re: Zooming in Object Graphics
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: Zooming in Object Graphics [message #22981 is a reply to message #22979] Wed, 20 December 2000 10:08 Go to previous messageGo to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Hello,

I don't want to open a can of worms, but...

This topic always reminds me of Randall Frank's recommendation to use
natural data coordinates rather than normalized data coordinates. I have
only done the graphics in natural coordinates a couple of times, so I'm
skating on thin ice with wobbly ankles. Zooming seems like a place where
it might be especially useful; of course, it's just a hunch and I've yet
to try it.

The ViewPlane_Rect would have to change as well as the location of the
axes/annotations (unless you didn't care to see them when zooming, kind
of like zooming on a bitmap.) The data ranges can be controlled by the
[XYZ]RANGE keywords. The tricky part is setting up the ViewPlane_Rect
so there will be enough room for the axes, etc. I know I build in the
border when making object graphics in normalized coordinates
(ViewPlane_Rect = [-.2,-.2, 1.4,1.4] or some such thing.) In natural
coordinates maybe the following could be done:

xMin = Min(ZoomedDataX, Max = xMax)
yMin = Min(ZoomedDataY, Max = yMax)

xSpan = xMax-xMin
ySpan = yMax-yMin

oView->SetProperty, ViewPlane_Rect = [xMin-0.2*xSpan, yMin-0.2*ySpan,
xSpan*1.4, ySpan*1.4]

oGrAtom->SetProperty, xRange = [xMin,yMin], yRange = [yMin,yMax]

oXaxis->Location = [xMin,yMin,0], Range = [xMin,xMax]

oYaxis->Location = [xMin,yMin,0], Range = [yMin,yMax]


Well, it's the holiday season, perhaps I'm having visions of sugared plums...


Ben

--
Ben Tupper
Bigelow Laboratory for Ocean Sciences
180 McKown Point Rd.
W. Boothbay Harbor, ME 04575
btupper@bigelow.org
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Polygon hull
Next Topic: New book on Calling C from IDL

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

Current Time: Wed Oct 08 19:56:23 PDT 2025

Total time taken to generate the page: 0.00445 seconds