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

Home » Public Forums » archive » Re: How to use max() to plot where in the plot max is located ?
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: How to use max() to plot where in the plot max is located ? [message #31829 is a reply to message #31826] Thu, 22 August 2002 09:36 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kolbjorn Bekkelund (kobe@rocketrange.no) writes:

> The file read in below conatins 14 lines of header info read into the
> header variable. Below these I've got about 1000 lines of 7 coloum
> floats. The snip of my program below plots the selected info in ok curves
> and adds info with xyouts about the max and min value of those. BUT; I
> would like to add a sign or a vertical bar going through the point of
> maximum.
>
> How do I do that ?

Use the second positional parameter to your MAX and MIN
functions to get the indices where the maximum or
minimum occurs:

min308=min(data(3,*), maxindex)
max308=max(data(3,*), minindex)

Then, just draw some kind of symbol on your plot. Say,
a big asterisk:

PLOTS,((data(3,*))[maxindex]/shots/0.0974),$
(data(2,*))[maxindex], color=166, PSYM=2, $
SYMSIZE=2.5

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: widget events and dlms
Next Topic: Re: switch colortable

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

Current Time: Sun Oct 12 03:32:51 PDT 2025

Total time taken to generate the page: 0.40039 seconds