comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Rant about axis range defaults using overplot in object graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Rant about axis range defaults using overplot in object graphics [message #91702 is a reply to message #91678] Thu, 13 August 2015 14:09 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Wednesday, August 12, 2015 at 1:16:38 PM UTC-6, laura...@gmail.com wrote:
> 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"?

Hi Laura,

As soon as you set the x or yrange, then IDL assumes that you don't want it to change and so it "sticks" for subsequent overplot calls. If you never set the range, then it assumes that you want it to update automatically.

Regarding the "single point", I'm actually plotting 2 points. plot([0,1]) is only giving the "y" coordinates, and IDL will simply plot those against the x index values, which will be 0 and 1. So the 2 points are [0,0] and [1,1].

Cheers,
Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: I require to input pixel coordinates to spit out lat-long of the same
Next Topic: Read data in more than one column

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:40:08 PDT 2025

Total time taken to generate the page: 0.00414 seconds