[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plot range in Object Graphics

Brad Gom (b_gom@hotmail.com) writes:

> If I have a simple x-y plot in object-graphics, how to I make the plot
> lines extend all the way to the axis borders like they do in direct
> graphics?   For example, the following code produces a line plot that
> extends flush to the right axis:
> x=findgen(10)
> plot, x, sin(x), xrange=[0,8.5], /xstyle
> If I make an IDLgrPlot object with the same data and xrange, and some
> IDLgrAxis objects with the proper xrange and yrange, then the plot stops
> at the last datapoint- namely x=8.
> Is there an obvious way to fix this that I'm missing?

Uh, well, I get identical results in my object graphics
XPLOT program (download the latest, there have been some
changes in most of these object program examples in the
past week or so) as I do in the direct graphics case.
Perhaps you are scaling the axes incorrectly. That is
*easy* to do in object graphics.

   XPlot, x, sin(x), xrange=[0,8.5], Exact=[1,0]

The program is available here:


Note that the zip files in this directory have NOT 
yet been updated with the program changes from the 
past two weeks. Maybe later this week. :-)



David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155