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

Home » Public Forums » archive » Re: max_value/min_value in the x-axis?
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: max_value/min_value in the x-axis? [message #81012] Fri, 03 August 2012 05:12
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
John Coxon writes:

> Ah, I should have been more clear: I want the axes to remain the same
> (hence looking specifically for an equivalent to MAX_VALUE instead of
> just using this method).

Ah. Well, then something like this, I guess:

indices = Value_Locate(x, [minVal, maxVal])
cgPlot, x[indices[0]:indices[1]], y[indices[0]:indices[1]], $
XRange=[Min(x),Max(x)]

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: max_value/min_value in the x-axis? [message #81013 is a reply to message #81012] Fri, 03 August 2012 05:05 Go to previous message
John Coxon is currently offline  John Coxon
Messages: 15
Registered: February 2012
Junior Member
On 03/08/2012 13:02, David Fanning wrote:
> John Coxon writes:
>
>> I want to plot something using the PLOT routine and I want to be able to
>> set max_value and min_value on the graph so that nothing above a certain
>> point is plotted. However, for various reasons, I'd quite like to do
>> this in the x-axis, and not the y-axis. I've Googled, but I can't find
>> an easy way to do this; I'm currently thinking that a where statement
>> might be my best bet, but does anyone have any alternative suggestions?
>
> Use the XRANGE keyword with XSTYLE set to 1.

Ah, I should have been more clear: I want the axes to remain the same
(hence looking specifically for an equivalent to MAX_VALUE instead of
just using this method).

--
John Coxon
http://www.chickensinenvelopes.net/
Re: max_value/min_value in the x-axis? [message #81014 is a reply to message #81013] Fri, 03 August 2012 05:02 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
John Coxon writes:

> I want to plot something using the PLOT routine and I want to be able to
> set max_value and min_value on the graph so that nothing above a certain
> point is plotted. However, for various reasons, I'd quite like to do
> this in the x-axis, and not the y-axis. I've Googled, but I can't find
> an easy way to do this; I'm currently thinking that a where statement
> might be my best bet, but does anyone have any alternative suggestions?

Use the XRANGE keyword with XSTYLE set to 1.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: max_value/min_value in the x-axis?
Next Topic: shifted .kml created with IDL

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

Current Time: Wed Oct 08 15:27:37 PDT 2025

Total time taken to generate the page: 0.00631 seconds