Re: Rant about axis range defaults using overplot in object graphics [message #91678 is a reply to message #91669] |
Wed, 12 August 2015 12:16   |
laura.hike
Messages: 87 Registered: September 2013
|
Member |
|
|
On Tuesday, August 11, 2015 at 4:22:22 PM UTC-7, Chris Torrence wrote:
>
> One tweak to alx's code is to simply set the x/yrange after the first plot. Once you set the range it should keep it constant. For example:
>
> IDL> p = plot([0,1])
> IDL> p.xrange = p.xrange
> IDL> p.yrange = p.yrange
> IDL> p1 = plot([0,2],/overplot)
Hmmm, that does work. Why? Shouldn't the behavior of the overplot option be the same no matter what value you set the axis ranges to?
Also, I see that you are able to plot a single point. I have never been able to do this (I always got an error message indicating that an array was required), but using your command, I can. I normally plot pairs of arrays, e.g., p = plot(x,y), but if I set x and y to individual values, I can't use this syntax. Is there an explanation for this beyond "That's the way it works"?
|
|
|