YRAANGE [message #93286] |
Mon, 06 June 2016 06:40  |
Ali Gamal
Messages: 98 Registered: June 2013
|
Member |
|
|
Hi,
I plot with yrange=[500,-300] but program produce y range as 400, 200, 0. but I want to make it as 500,0,-500,-1000 (I want to control with range)
how can I do it?
|
|
|
Re: YRAANGE [message #93288 is a reply to message #93286] |
Mon, 06 June 2016 08:31   |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Monday, June 6, 2016 at 9:41:01 AM UTC-4, AGW wrote:
> Hi,
> I plot with yrange=[500,-300] but program produce y range as 400, 200, 0. but I want to make it as 500,0,-500,-1000 (I want to control with range)
> how can I do it?
I am not sure I understand what you want and I don't know if you are using the plot function or the old plot procedure, but setting ystyle =1 will force the plot to use the exact Y range rather than rounding
plot,indgen(600)-200,yrange=[500,-200],ystyle=1
|
|
|
Re: YRAANGE [message #93290 is a reply to message #93286] |
Mon, 06 June 2016 13:50   |
Ali Gamal
Messages: 98 Registered: June 2013
|
Member |
|
|
On Monday, June 6, 2016 at 3:41:01 PM UTC+2, AGW wrote:
> Hi,
> I plot with yrange=[500,-300] but program produce y range as 400, 200, 0. but I want to make it as 500,0,-500,-1000 (I want to control with range)
> how can I do it?
I want to say in y axis appears range as 400, 200, 0. etc I want to make it appears as 500,0,-500,-1000 in all cases YRANGE=[500,-3000]. In other words I want to control with numbers on Y range as every 500 or 200 ...
|
|
|
Re: YRAANGE [message #93291 is a reply to message #93290] |
Mon, 06 June 2016 19:17   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 6/6/16 2:50 pm, AGW wrote:
> On Monday, June 6, 2016 at 3:41:01 PM UTC+2, AGW wrote:
>> Hi, I plot with yrange=[500,-300] but program produce y range as
>> 400, 200, 0. but I want to make it as 500,0,-500,-1000 (I want to
>> control with range) how can I do it?
>
> I want to say in y axis appears range as 400, 200, 0. etc I want to
> make it appears as 500,0,-500,-1000 in all cases YRANGE=[500,-3000].
> In other words I want to control with numbers on Y range as every 500
> or 200 ...
>
I'm still a bit confused, but I think you mean that you want to control
the y-axis range (YRANGE) and the y-axis tick mark locations (YTICKV), i.e.:
plot, findgen(20) * 20, yrange=[0, 500], ytickv=findgen(11) * 50, $
yticks=10, yminor=5
This makes the y-axis range 0 to 500 and places a tickmark every 50. But
you could do something more exotic, e.g.:
plot, findgen(20) * 20, yrange=[0, 500], $
ytickv=[0., 100., 125., 150., 175., $
200., 250., 300., 400., 450., 500.], $
yticks=10, yminor=5
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
|
|
|
Re: YRAANGE [message #93292 is a reply to message #93290] |
Tue, 07 June 2016 00:54   |
lecacheux.alain
Messages: 325 Registered: January 2008
|
Senior Member |
|
|
Le lundi 6 juin 2016 22:50:29 UTC+2, AGW a écrit :
> On Monday, June 6, 2016 at 3:41:01 PM UTC+2, AGW wrote:
>> Hi,
>> I plot with yrange=[500,-300] but program produce y range as 400, 200, 0. but I want to make it as 500,0,-500,-1000 (I want to control with range)
>> how can I do it?
>
> I want to say in y axis appears range as 400, 200, 0. etc I want to make it appears as 500,0,-500,-1000 in all cases YRANGE=[500,-3000]. In other words I want to control with numbers on Y range as every 500 or 200 ...
pl = plot(your_data, YRANGE=[500,-1000], YTICKINTERVAL=500)
|
|
|
Re: YRAANGE [message #93295 is a reply to message #93286] |
Tue, 07 June 2016 13:13  |
Ali Gamal
Messages: 98 Registered: June 2013
|
Member |
|
|
On Monday, June 6, 2016 at 3:41:01 PM UTC+2, AGW wrote:
> Hi,
> I plot with yrange=[500,-300] but program produce y range as 400, 200, 0. but I want to make it as 500,0,-500,-1000 (I want to control with range)
> how can I do it?
thanks a lot
|
|
|