[Thread Prev][Thread Next][Index]

Re: [ferret_users] images/labels pile up


When making a set of plots on a page, it's usually best to leave off most of the labels.  You don't want the labels for dataset, variable name, and so forth repeated for each plot.  All of the automatically-generated labels are good for exploring data, so that everything is automatically on the page, but for making a final plot, a lot of simplification is needed.

What I do is to use shade/nolabel in such a script, and then add the labels I do want with separate commands.  The ANNOTATE command , http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/commands-reference/annotate, makes it easy to locate labels relative to the plot box in each viewport.  Run the script "go annotate_demo" for an introduction to this command if you don't know it.

Try this script:
use coads_climatology

set view ur; shade/nolab sst[l=@min]
annotate/norm/xpos=0.5/ypos=-0.2/halign=0/valign=0/siz=0.16 "Minimum over time"

set view ll; shade/nolab sst[l=@std]
annotate/norm/xpos=0.5/ypos=-0.2/halign=0/valign=0/siz=0.16 "Standard Deviation in time"

set view lr; shade/nolab sst[l=@max]
annotate/norm/xpos=0.5/ypos=-0.2/halign=0/valign=0/siz=0.16 "Minimum over time"

! Make a blank plot and use it to make labels for the entire dataset
! this is a completely blank plot: no labels or axis, and the data is outside the
! requested /VLIMITS

set view full; plot/noaxis/nolab/vlim=100:200/x=1:5 x

annotate/norm/xpos=0.5/ypos=1.15/halign=0/valign=0/siz=0.18 \
"COADS Climatology `sst,return=title` (`sst,return=units`)"

There's a lot more you could do:

- Once the labels are taken off, you don't need all that white space around the edges, so defining custom viewports with DEFINE VIEWPORT would make for better spacing.   Look at DEFINE VIEWPORT/AXES

- When the same variable is plotted in multiple panels, it helps in comparing the data to use use a set of common color levels. In this case a single colorbar makes for a much better plot. (Here your standard deviation plot would need it's own levels of course).  There's a thread here about that:

although the shakey command for the common colorbar may need some tweaking.  When I drew it, it was too wide, so I used,
ppl shakey 1 1 .12 1 3 9 `($ppl$xlen)+1.2+.5` `($ppl$xlen)+1.2+.8` 1.4 `1.4+3*($ppl$ylen)+2.25`

On 1/26/2017 9:16 AM, Ge Peng - NOAA Affiliate wrote:
Dear Ferret users,

I have just run into something strange and am wondering if someone can help me with it - the labels including those for color bars, possibly figures, kept piling up on top of each other when looping through multiple variables using repeat.

Ferret info:


  FERRET v7 (optimized)

  Darwin 15.6.0 64-bit - 07/26/16

  26-Jan-17 11:51  

Running on MacBook Air with macOS Sierra version 10.12.2.

​The ferret script using coads climatology is attached.

​Slides 1, 2, and 4 in the attached ppt file contain figures generated using the attached script while looping through all variables (it does not seem to matter if I use "cancel view all" at the beginning or the end of the repeat loop or not at all).

Slide 3 contain the figures for AIRT using the same script but for one variable only.


--- Peng


Ge Peng, PhD
Research Scholar
Cooperative Institute for Climate and Satellites - NC (CICS-NC)/NCSU and

NOAA’s National Centers for Environmental Information (NCEI)

Center for Weather and Climate (CWC)

151 Patton Ave, Asheville, NC 28801
+1 828 257 3009; ge.peng@xxxxxxxx

ORCID: http://orcid.org/0000-0002-1986-9115

Following CICS-NC on Facebook

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

Privacy Policy | Disclaimer | Accessibility Statement