[Thread Prev][Thread Next][Index]

Re: [ferret_users] how to insert scale



Hi All,

Executive Summary: Try the 3-line demo below.

There is a pair of PPL Advanced Commands that may be of use in this situation: PPL %XAXIS and PPL %YAXIS (yes, that is a percent sign before the XAXIS and YAXIS). From their arguments and description in the "Advanced Commands" section it appears their main purpose is to add extra axes to a plot as, for example, if one wanted to plot temperature and salinity versus depth and maybe use the lower axis for temperature and the upper one (or a vertically shifted) for salinity. The new axis defined by %XAXIS, which applies to subsequent info plotted, spans the full width of the previous plot but is just offset vertically. If the purpose of the original questioner is to add an axis for visual purposes and NOT span the entire width or height, that would perhaps best be done in an overlay window.
	Here's a simple demo of PPL %XAXIS

!************ DEMO ***************
go ptest
ppl %xaxis/nouser 0,100,20,1,4,1,1,-1,0.15,(i3)
plot/o/vs/nolab/sym=88 80,0 ! the placement of the star shows the new x-axis is now in effect
!************************************

where the arguments are XLOW, XHIGH, XINC
Y (the vertical offset of the new x-axis - 1inch here because I specified nouser)
LINT (label interval of large tics)
XUNIT (allows scaling of axis label)
IPOS (-1 below, +1 above, 0 none)
CSIZE (Label height in inches)
FRMT (format for axis labels)

For the full description, see the Plot Plus User Guide. Note that there are other "goodies" in the PPL Advanced Command toolkit.

Mick
-------

On Aug 10, 2011, at 3:05 AM, Hein Zelle wrote:

Dear Dessy Berlianty,

I would like to ask any help how to overlay a scale (from 0 - 1 km) in our plot image?
I would really appreciate for any suggestion about it.

Could you tell us a little more about your plot?  What grid is your
data defined on?  (show grid my_variable)

If your data is defined on a grid which has km as units, then Ferret
will automatically plot the grid along the axis borders.
Alternatively you could draw a scale manually as Ryo Furue suggested.
You could do this, for example, like this:

! select 2 points in your map which are 1 km apart, in a location
! which is suitable for drawing the scale. I will take (-8.5,-9.2) and ! (-7.5,-8.7) as an example, modify this according to your data and grid.

define axis /x=-10:10:0.5 my_x
define axis /y=-10:10:0.5 my_y

let pattern=sin(x[gx=my_x])+cos(y[gy=my_y])
shade /pal=dark_land_sea pattern

plot /vs/overlay/line/color=green/title="1 km" {-8.5, -7.5}, {-9.2,-9.2}
! optional: add vertical "end" marks
plot /vs/overlay/line/color=green/nolab {-8.5,-8.5},{-9.3,-9.1}
plot /vs/overlay/line/color=green/nolab {-7.5,-7.5},{-9.3,-9.1}


You can use the label command to put the text "1 km" inside the plot
next to your scale, instead of below the plot using the standard legend.

Kind regards,

   Hein Zelle

--

Dr. Hein Zelle
Advisor Meteorology & Oceanography

Tel:    +31 (0)527-242299
Fax:    +31 (0)527-242016
Email:  hein.zelle@xxxxxxxxxxxxx
Web:    www.bmtargoss.com

BMT ARGOSS
P.O. Box 61, 8325 ZH Vollenhove
Voorsterweg 28, 8316 PT Marknesse
The Netherlands

----Confidentiality Notice & Disclaimer----

The contents of this e-mail and any attachments are intended for the
use of the mail addressee(s) shown. If you are not that person, you
are not allowed to read it, to take any action based upon it or to
copy it, forward, distribute or disclose the contents of it and you
should please delete it from your system. BMT ARGOSS does not accept
liability for any errors or omissions in the context of this e-mail or
its attachments which arise as a result of internet transmission, nor
accept liability for statements which are those of the author and
clearly not made on behalf of BMT ARGOSS.



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

Privacy Policy | Disclaimer | Accessibility Statement