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

Home » Public Forums » archive » Re: I'm a beginner, IDL question plot, max_value
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: I'm a beginner, IDL question plot, max_value [message #81892 is a reply to message #81802] Fri, 26 October 2012 13:00 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Thursday, October 25, 2012 5:06:18 PM UTC-6, David Fanning wrote:
> Mati writes:
>
>
>
>> I've got an ascii file with lots of rows and columns, I must select 2 columns,x and y,plot them and set max and min value to exclude bad data points.
>
>> Here is what I've made(it works,but I don't know if it's the best way to do it):
>
>>
>
>> data=read_ascii('')
>
>> x=data.field01[6,*]
>
>> y=data.field01[14,*]
>
>> plot,x,y,max_value=40,min_value=0
>
>>
>
>> the problem is: max_value and min_value gives extremes to pick up data only for y variable...how can I do to set also max_value and min_value for x???
>
>
>
> You typically set the XRange keyword to change the x values
>
> that are plotted on the plot. You have to be careful, though,
>
> since IDL will "autoscale" the axes. This is sometimes what
>
> you want and sometimes not. If you want to turn it off, you
>
> also have to set the [XY]Style keywords:
>
>
>
> cgPlot, x, y, XRANGE=[20,64], YRANGE=[0,40], XSTYLE=1, YSTYLE=1
>
>
>
> Sometimes, it is easier to just do this interactively by
>
> drawing a rubberband box around the part of the plot you
>
> want to "zoom into":
>
>
>
> cgZPlot, x, y
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
> Sepore ma de ni thue. ("Perhaps thos speakest truth.")

Or, in new graphics:

p = plot(findgen(100), randomu(seed,100), xrange=[10,90], yrange=[0.2,0.8])

:-)
[Message index]
 
Read Message
Read Message
Previous Topic: IDL New Graphics Axis function: bug or feature?
Next Topic: vizconn

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

Current Time: Sun Oct 12 00:01:28 PDT 2025

Total time taken to generate the page: 0.01017 seconds