[Thread Prev][Thread Next][Index]

Re: [ferret_users] line of max



Hi,
Try a separate plot of

   yes? plot ed[x=70:700@max]

That line has units of the variable, so it doesn't overlay on the coordinates of the 2-D plot.  Now, on the FILL plot, do you want to show the location of the maximum value of the variable?  You could use some of the ideas of the FAQ, "

    How can I show the value of my variable at its deepest depth?

You'd define a variable which is zero at each maximum location in x.

yes? let vz = ed - ed[x=@max]
Then try,
yes? fill/trans ed

yes? let z0 = if vz eq 0 then 1  ! This is 1 at the locations of the function ed[x=@max]
yes? shade/over/trans/pal=black/nolab z0
That's kind of it - the SHADE plot fills in each box where the function ed-ed[x=@max] is zero.  In ther FAQ is trying to get the value of the temperature variable at the deepest depth - that's not what we need here, we want the X where the variable is its max. Here's a 2-D function is just each x repeated over all time (do a shade plot if you want to see what it looks like):
yes? let xvar =  x[gx=ed] + 0*t[gt=ed]
Multiply z0*xvar to pick out the values of X where ed is its max.
yes? let z0 = if vz eq 0 then 1
yes? let x_where_max = compressi(z0*xvar)
This is the x-location of the max in x for each t.  (Again, do a "shade z0" and "shade z0*xvar", to see it.)
yes? list/i=1 x_where_max
Now overlay on the 2D plot, using plot/VS. The first argument is a list of time points on the horizontal axis and these x locations on the vertical axis.
yes? fill/trans ed
yes? plot/over/vs/nolab t[gt=ed], x_where_max[i=1]
You could use plot qualifiers like /LINE or /SYMBOL=, /THICK etc.  to control the way the plot looks.



On 7/15/2014 1:47 AM, Gopal Mondal wrote:
I have a data set, attached with this mail, to make a fill plot. Over the fill plot I want to make a line plot of max(var) over it. The fill plot is ok, but over it line plot is not visible in figure, following command are used.
yes? fill/trans ed ! Figure is ok
yes? plot/over ed[x=70:700@max] ! no line comes..
 What to do?
Please help any one....
Thanks in adv...
Gopal


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement