[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
coordinate conversion factor woes in object graphics
- Subject: coordinate conversion factor woes in object graphics
- From: Brad Gom <b_gom(at)hotmail.com>
- Date: Fri, 16 Jun 2000 09:47:20 -1000
- Newsgroups: comp.lang.idl-pvwave
- Organization: University of Hawaii
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:19970
I'm having a little trouble with my axes in object graphics. Following
David Fanning's canonical method for producing x-y plots in object
graphics, I use the xcoord_conv and ycoord_conv keywords to the
IDLgrAxis and IDLgrPlot objects to scale the plot properly in the
window. My problem is that when the range of the axes is small compared
to the value of the axis origin (ie. (xrange-xrange)/xrange <~
1e-6) , the axis don't get positioned properly in the window.
For example, say I want to plot something as a function of julian date,
over a range of a few days. The xrange is small, whereas the julian day
numbers are huge. In direct graphics, the axes look fine, but not in
object graphics. The following code shows the problem, using David's
XPlot routine that can be found on his webpage.
x=dindgen(100)/100+2451598 ;a span of one julian day.
xplot, x, y ;note that the axes don't align properly.
plot, x, y ;the rounding error in the data is
visible, but the axes look right.
How can I get around this? Is there another (better) approach to
scaling plots into a window?