[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:
> Pavel Romashkin wrote:
>
> > I think you also have to apply the same normalization (xcoord_conv) the
> > rest of the plot has, to the one you are adding.
>
> Right. I didn't mention that.
>
> > In cases like this, I tried also keeping plot limits in an array, to avoid
> > multiple looped
> > queries to IDLgrPlots contained in my graph. This way, it is easy to
> > reset the limits of the axes if, lets say, you remove the plot that
> > caused axes to extend to a certain limit.
>
> Another simple minded approach I thought of was making some IDLgrPolygon objects
> that sit around the plot limits. This way, any lines that were plotted beyond the
> axis would be hidden by the polygons. There would be alot of extra rendering
> happening of course. Despite the inelegance, the advantage would be that you
> wouldn't have to change the ranges of the plots.
I really think this is a simple problem of not scaling
either the data or the axes properly. This is *so* easy
to do in object graphics. In fact, I'm convinced most
people are scaling their data improperly because they don't
realize that object axes autoscale. They only discover their
mistakes when they get down to the fine detail of something
like this. And by then, who knows how many scientists have
been led astray by erroneous illustrations in scientific
journals.
You have to go get the *actual* values of your axes and
scale the data to those, or you will get exactly the problems
you describe.
Cheers,
David
P.S. Please don't implement the Polygon idea. It's just to
grim to imagine and is in the worst tradition of just getting
the damn thing to work. :-(
--
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