[Thread Prev][Thread Next][Index]

Re: [ferret_users] extracting info from axes



Hi Ge Peng -

Any quantity that is written on a default plot is available as a symbol.

For example, if you:

plot/i=242/j=14/k=22/l=8 varname

The plot and title will contain the information you want (perhaps in the upper left corner, or in the title below the plot).

AFTER making such a plot, these symbols will be found by:

yes? ppl listsym

These symbols will generally be numbered lab4, lab5, lab6, .... (lab1,2,3 are the standard Ferret info that appears in the upper right corner of the plot).

You can write these in subsequent plots as follows:

label xpos ypos center angle size ($lab4)

And, you can get fancier by noticing that these label numbers are flagged by other symbols in the list. You don't have to do that long listing every time. For example, the label for the plot longitude (if it is relevant) is flagged by the symbol labnum_x. So, you can always write the longitude by:

label xpos ypos center angle size ($lab($labnum_x))

In addition to the location identifiers, there are also the labels for the dataset (flagged by labnum_dset) and others as appropriate.

The one rule to remember is that these symbols are defined ONLY AS THE PLOT IS DRAWN. You MUST make a standard plot (without /NOLABEL) to define them before you can use them.

Billy K


On 18/02/2009, at 4:19 PM, Ge Peng wrote:

Hi Ferret Users,

Apology if this request is too elementary.

I would like to extract grid info from a data set for the purpose of
labeling. For example, for a given region/i=242/j=14/k=22/l=8, I have the
lon, lat, z, and time as follows:

yes? list x[gx=xt_ocean]
             VARIABLE : X
                        axis XT_OCEAN
             LONGITUDE: 38.5W(-38.5)
         -38.50
yes? list y[gy=yt_ocean]
             VARIABLE : Y
                        axis YT_OCEAN
             LATITUDE : 68.5S
         -68.50
yes?  list z[gz=zt_ocean]
             VARIABLE : Z
                        axis ZT_OCEAN
             DEPTH (m): 215
          215.0

yes? list t[gt=TIME]
             VARIABLE : T
                        axis TIME
             TIME     : 07-FEB-1999 12:00 JULIAN
          2228.

I would like to define a label, which should be something like
"38.5W, 68.5S, DEPTH (m): 215, 07-FEB-1999"

Of cause, it will be different for a different region if I change i,j,k,
or l values.

Is it a way to create the label dynamically?

Thanks,

--- Peng






[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement