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 #81802] Thu, 25 October 2012 16:06 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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.")
[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: Fri Oct 10 04:37:24 PDT 2025

Total time taken to generate the page: 0.95860 seconds