[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Log axes using object graphics
- Subject: Log axes using object graphics
- From: Brad Gom <b_gom(at)hotmail.com>
- Date: Tue, 20 Jun 2000 16:58:09 -1000
- Newsgroups: comp.lang.idl-pvwave
- Organization: University of Hawaii
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:19996
I've been using object graphics to make a plot object that uses the
mouse for zooming, data picking, etc. (in the style of David Fanning's
XPlot routine). It works great for linear axes, but now I want to add
the option of having logarithmic axes. It sort of works, but tends to
hang the session more often than do something predictable.
The problem I'm having is that when the axes are set to log mode, they
return the log of the axis ranges in the CRange parameters. I sort of
understand how to properly scale 'normal' graphics objects, but now I'm
For example, if I set the range of an IDLgrAxis object to the
axis=obj_new('IdlgrAxis', range=[5d,50000d], /log, /exact)
and then retrieved the 'actual' range later for coordinate conversion :
crange would contain [0.698970, 4.69897] instead of [5,50000].
My question is how to I set the coordinate convertion factors in all my
other graphic objects? Do I use the real range, or the log of the range?
Do I do the following?
xs = Norm_range(crange)
Plot->SetProperty, XCoord_Conv=xs, xrange=crange
or the following?
realrange=10d ^ crange
xs = Norm_range(realrange)
Plot->SetProperty, XCoord_Conv=xs, xrange=realrange
get my drift?
What about when data-picking and other times when you have to convert
the values- how do you know whether to use the real range or the log of