[Thread Prev][Thread Next][Index]

Re: labelling ...



Hi all,
Just a quick note on the documentation Mick mentions.  The PPLUS
users guide is included as Appendix B to the Ferret users guide at
http://ferret.pmel.noaa.gov/Ferret/Documentation/Users_Guide/current/fer_html.htm

You will want to start by studying Chapter 6 of the Ferret Users Guide,
"Customizing Plots"  for how to make PPLUS calls from Ferret.

Ansley Manke

Mick Spillane wrote:

> Hi Emilie,
>         Welcome to Ferret! Most of what you want can be achieved - but at
> the cost of increased customization if the wants are not among the built-in
> style choices.
>
> 1) the legends for the different curves
> > My first question is : Is it possible to put this legend somewhere else ?
> > Because it is not so well visible there and the text size is too small.
> > (a sub-question is : is it possible to put the 4 filenames in this
> > legend ? Because there are just 3 ... The first data filename is not
> > there, it is in the "data set" above-right).
> I think you probably plotted the variable from file#1 first, then added
> the other 3 as overlays.  A more pleasing result may result if you plot
> all 4 with a single command, as in the following demo
>
> def axis/t="1-dec-2002:00:00":"31-dec-2002:18:00":6/units=hours tax
> def grid/t=tax grd ; let tt=l[g=grd]
> let/title="T (dataset-1)" v1=tt
> let/title="T (dataset-2)" v2=125-tt
> let/title="T (dataset-3)" v3=125-2*(tt-64)
> let/title="T (dataset-4)" v4=2*(tt-64)
> ! this gives me 4 variables with names of my choosing.
> plot v1,v2,v3,v4
>
> Introducing new variables like that
>           let/title="T (dataset-1)" v1=t321[d=1]
> helps to reduce the length of the default string for a dataset variable.
> When plotted together the default appearance is not too bad. But if you
> want to make changes you can do so in various ways.
>
> a) if the position of the line samples is acceptable but the size of
>    text is too small - use "ppl listsym" to identify the labels in
>    question (5,6,7,8) and increase height
> ppl hlabs,5,0.2 ; ppl hlabs,6,0.2 ; ppl hlabs,7,0.2 ; ppl hlabs,8,0.2
> ppl plot
>
> b) The placement of the sample lines can be controlled by turning them
>    off (plot/nolab) then adding them with a set of ppl aline commands.
>    But the placement of the sample line text can be customized by making
>    them movable and positioning them using crosshairs. For the latter
> ppl labs,5,@p1@crDataset-1 ; ppl labs,6,@p2@crDataset-2
> ppl labs,7,@p3@crDataset-3 ; ppl labs,8,@p4@crDataset-4
> ppl plot
> !where I've changed the font and color of the labels and you can place the
> them wherever you want - maybe with arrows associating ech with its curve.
> A dialog box opens on the plot for each movable label - first click on the
> label style, then place the crosshair where the lable should appear and
> click again. Maybe you could dispence with the sample lines entirely and
> use colored text strings within the box, perhaps as follows
> plot/set/nolab v1,v2,v3,v4
> ppl txlint,1,0 ; ppl plot ! which starts with labeled axes only
>                           ! and removes the DEC below the days
> label/nouser 4 -0.5 0 0 0.15 @crDecember 2002
> label/nouser 7.9 1.00 1 0 0.15 @p1@crDataset-1
> label/nouser 7.9 0.75 1 0 0.15 @p2@crDataset-2
> label/nouser 7.9 0.50 1 0 0.15 @p3@crDataset-3
> label/nouser 7.9 0.25 1 0 0.15 @p4@crDataset-4
>
> 2) Time axis labelling
> > My second question is : How can I put my t-axis in a format like
> > DD-MMM-YYYY ?
> This is not among the labelling choices available so if you really
> want it you will have to customize it entirely by first turning off
> time axis labelling ...
> plot/set/nolab v1,v2,v3,v4 ; ppl txlabp,0 ; ppl plot
> ... then positioning labels at selected axis precalculated axis positions
> using label/nouser
> label/nouser 0.1 -0.3 0 0 0.1 @sr1-DEC-2002
> label/nouser 7.9 -0.3 0 0 0.1 @sr31-DEC-2002
> label/nouser 3.9 -0.3 0 0 0.1 @sr15-DEC-2002
> ! or as movable labels with crosshair positioning
> ppl labs,1,@sr01-DEC-2002
> ppl labs,2,@sr06-DEC-2002
> ppl labs,3,@sr11-DEC-2002
> ppl labs,4,@sr16-DEC-2002
> ppl labs,5,@sr21-DEC-2002
> ppl labs,6,@sr26-DEC-2002
> ppl labs,7,@sr31-DEC-2002
> ppl plot
>
> Positioning custom labels is a lot easier in non-timeaxis situations
> maybe with the use of a repeat/i=... (label ...) construction. Note that
> when you use movable labels your choices are written to a file (fort.41)
> which you can incorporate into future scripts with the same axis.
>
> --------------------------------------------------------------------
> The purpose of this lengthy reply was to demonstrate that just about
> anything can be achieved with sufficient effort at customization. To
> learn the tools, and know the built-in choices, you will need to digest
> the PlotPlus Users Guide
>    ftp://ftp.pmel.noaa.gov/epic/manual-dir/pplus.pdf
> and the PPL+ extensions
>    http://ferret.wrc.noaa.gov/Ferret/Documentation/PPLUS_Users_Guide/
>                                          pplus_enhance_user_guide.html
>
> Good luck,
> Mick

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement