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

Home » Public Forums » archive » Reversing Object Graphics Axis Range
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: Reversing Object Graphics Axis Range [message #27595 is a reply to message #27476] Thu, 25 October 2001 12:49 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
From: "David Fanning" <david@dfanning.com>
> I had occasion the other day to require a reverse
> object graphics axis (Ie., one that went from 1.2
> at the bottom of the axis to 0 on the top....
>
> I figured out a way (eventually) to get what I wanted,
> but I ran into all kinds of interesting "features"
> in the process. I was going to write my observations
> up in an article to save everyone else the excessive
> effort, but I got to thinking that *surely* this can't
> really be this hard.
>
> So, has anyone managed to do something like this in
> a simple and straightforward way that I may have
> overlooked?

Not really. Are you aware that there is an object graphics reverse-axis
example included with IDL (EX_REVERSE_PLOT)? It was introduced with 5.4. At
the time I tried it out and noticed various problems, in particular that the
titles looked wrong. I raised this with Atle @ RSI Tech Support and he sent
back a cool little GUI routine, which I have taken the liberty of attaching.
I don't know if it handles every case though and it seems kind of fiddly.

So I have gone back to my original method of reversing object-graphics axes:
keep the data range positive and use TICKFORMAT to make it *look* reversed.
For example if I have an array "depth" representing positive distance below
the ocean surface and I want to plot it against the Y axis, I use

z = - depth
xaxis = obj_new('IDLgrAxis', 1, RANGE=[min(z),max(z)] $
, TITLE='Depth (m)', TICKFORMAT='mgh_tf_negative')

where MGH_TF_NEGATIVE is here

http://katipo.niwa.cri.nz/~hadfield/gust/software/idl/mgh_tf _negative.pro

and there's also a more general linear-scaling routine here

http://katipo.niwa.cri.nz/~hadfield/gust/software/idl/mgh_tf _linear.pro

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research



--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Newbie question again - Marking region of interest
Next Topic: Re: Beginner Question: Disappearing Info Structure/Motion Events

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

Current Time: Tue Dec 02 11:34:56 PST 2025

Total time taken to generate the page: 0.88421 seconds