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

Home » Public Forums » archive » Re: Specifying plot ranges
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Specifying plot ranges [message #78980] Mon, 16 January 2012 03:42 Go to next message
Craig Markwardt is currently offline  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
Re: Specifying plot ranges [message #78981 is a reply to message #78980] Mon, 16 January 2012 03:53 Go to previous message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
add xstyle=1, ystyle=1 to force exact ranges.

Greg
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Specifying plot ranges
Next Topic: textoidl textable postscript symbol

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

Current Time: Wed Oct 08 19:35:50 PDT 2025

Total time taken to generate the page: 0.00619 seconds