Re: Moving Axes [message #58506 is a reply to message #3730] |
Wed, 30 January 2008 07:10  |
Allan Whiteford
Messages: 117 Registered: June 2006
|
Senior Member |
|
|
chloesharrocks@gmail.com wrote:
> Dear all
>
> I'm plotting data which has both +ve and -ve x and y values and
> possesses a linear relationship which crosses the xaxis at a value
>
>> 0. At the moment my x-axis is 'sitting' at y= -5, which makes it
>
> very hard to notice that the xintercept is positive when just looking
> at the graph (I do have an xyout output telling me the xintercept
> value, but it would be nice if just a quick glance at the graph made
> this obvious). Is there any way for me to move the x-axis up so it
> sits on y=0 (and similarly moving the y-axis so its at x=0) but so
> that my negative value data is still plotted? I presume there must be
> an easy way to do this in IDL - at the moment I'm just overplotting
> lines corresponding to y=0 and x=0 just so I can clearly see the
> xintercept's positive.
>
> Thanks
> Chlo�
>
> PS. I'm a complete IDL novice, so the simpler the better please!
Chlo�,
Look at the AXIS procedure.
E.g.:
IDL> plot,findgen(11)-5,findgen(11)-5,xstyle=4,ystyle=4
IDL> axis,0,0
IDL> axis,0,0,/yax
Thanks,
Allan
|
|
|