Re: Specifying plot ranges [message #78980] |
Mon, 16 January 2012 03:42  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Jan 16, 4:37 am, Sir Loin Steak <lj...@fsmail.net> wrote:
> Hi all
>
> I have a quick question I hope you can help with. I have been making a
> plot with GDL, and it comes out as expected, with the axes in the
> ranges I want. However, when I use the exact same code with IDL, it
> refuses to accept the ranges I have specified. For example, with the
> following code
>
> loadct, 0, /silent
> plot, [0], [0], /nodata, xrange=[0,1200], yrange=[-90,90], $
> yticks=6, xticks=10, $
> color=0, background=255, $
> xtitle='Time', ytitle='Latitude'
>
> GDL plots fine, but IDL sets the x-axis to [-400,1600] and the y-axis
> to [-150,150]. Can anyone offer any insight as to why it works with
> GDL but not IDL??? It's beginning to annoy me now, especially since it
> will no doubt be something obvious!
By default, IDL tries to rescale the plot range to make the major tick
marks look better. Turn this behavior off with the keywords XSTYLE=1,
YSTYLE=1. That should probably solve your problem.
Craig
|
|
|
|