[Thread Prev][Thread Next][Index]

Re: [ferret_users] Problem in removing labels



Hi-
I've edited the Users Guide so that the section about removing labels from plots includes more info about the /NOLABELS qualifier for plot commands, and also the handy "MODE LOGO" which lets you turn off the Ferret logo in the upper right hand corner of plots.  That documentation change will be on our pages the next time we publish them to the public server.

Since we're talking about viewports, it's often nice to define them with less white space between them, which is easily done with the /AXES qualifier on DEFINE VIEWPORT.

It also makes a nicer presentation to share a color key for all the plots, when the color key is the same. Here's a message which talks about that:  http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2000/msg00226.html

One more detail is to use the PPL axlabp command to remove the some of the plot-axis labels, so that only axes along the left and bottom sides of the viewports are labeled (again, if they all share the same axes). That makes it possible to clean up plots even further.

    ppl axlabp,-1,-1 !  Label the y-axis, on the left, x-axis on the bottom
    ppl axlabp,0,-1  !  Label only the y-axis, on the left
    ppl axlabp,0,0   !  No axis labels.
    ppl axlabp,-1,0  !  Label x-axis on the bottom


The script for this plot is below.  When taking off Ferret's automatically-generated labels, we have to do extra work to annotate the plots, but for a final plot, it's worth the effort.


define view/axes/xlimits=0.07,0.47/ylimits=0.1,.35 botl
define view/axes/xlimits=0.07,0.47/ylimits=.4,.65 midl
define view/axes/xlimits=0.07,0.47/ylimits=.7,.95 topl
define view/axes/xlimits=0.5,0.9/ylimits=0.1,.35 botr
define view/axes/xlimits=0.5,0.9/ylimits=.4,.65 midr
define view/axes/xlimits=0.5,0.9/ylimits=.7,.95 topr

use coads_climatology

! Draw 6 months of plots. Set the contour levels on the first one, and then use /LEV
! to reuse the same levels on other plots.

! Make a label above each plot with the month.

ppl axlabp,0,-1  ! Label only the y-axis, on the left

set view topl; shade/lev=(-inf)(0,30,1)(inf)/L=1/nokey/nolab sst
label/nouser `($ppl$xlen)/2`, `($ppl$ylen)-0.2`,0,0,0.12,"January"

set v midl; shade/lev/l=2/nokey/nolab sst
label/nouser `($ppl$xlen)/2`, `($ppl$ylen)-0.2`,0,0,0.12,"February"

ppl axlabp,0,-1  !  Label x-axis on the bottom, y-axis, on the left

set v botl; shade/lev/l=3/nokey/nolab sst
label/nouser `($ppl$xlen)/2`, `($ppl$ylen)-0.2`,0,0,0.12,"March"

ppl axlabp,0,0  ! No axis labels

set v topr; shade/lev/l=4/nokey/nolab sst
label/nouser `($ppl$xlen)/2`, `($ppl$ylen)-0.2`,0,0,0.12,"April"

set v midr; shade/lev/l=5/nokey/nolab sst
label/nouser `($ppl$xlen)/2`, `($ppl$ylen)-0.2`,0,0,0.12,"May"

ppl axlabp,-1,0  !  Label x-axis on the bottom

! This last plot will include the color key.  It's drawn using SHAKEY settings, to
! make extra long covering the entire right-hand side.

set v botr; shade/lev/l=6/set/nolab sst
ppl shakey 1 1 .12 1 3 9 `($ppl$xlen)+1.2+.5` `($ppl$xlen)+1.2+1` 1.4 `1.4+3*($ppl$ylen)+1`
ppl shade
label/nouser `($ppl$xlen)/2`, `($ppl$ylen)-0.2`,0,0,0.12,"June"

! Now do a completely blank plot on the full page, to set
! plot symbols and let us locate a label across the bottom.

set view full
plot/nolab/noaxes/color=white/sym/i=1:2  i

label/nouser `($ppl$xlen)/2`,-1.1,0,0,0.16, COADS Climatology SST (Deg C)


On 5/18/2012 7:46 AM, Karl Smith wrote:
Hi Sudev,

See if FILL /NOLABELS does what you need.  FILL is another name for
CONTOUR /FILL, so check the Ferret documentation for CONTOUR for this
option .

Karl

On Fri, May 18, 2012 at 5:58 AM, Sudev Das M P <devdas.pnr@xxxxxxxxx> wrote:
Hai,

I want to remove the labels on the view port. I tried to do it but
couldn't do it. What I tried I am giving below. Please give me some
suggestion.

Thanks,
Sudev

==========================================================
!Open dataset
use "file.nc"

!To create the metafile
set mode metafile

!To show the details of the dataset
show data

!To show the details of the variable "temp"
show grid temp

!To set the window size
SET WINDOW/SIZE=0.9/ASPECT=0.9
fill/k=1/l=1 temp
go fland

ppl list labels !shows the 6 removable labels.
ppl labs/nouser,7.790E+00,7.390E+00,0.060,0 @ASFERRET Ver. 6.2 !
removes ferret logo at top-right corner
ppl labs/nouser,7.790E+00,7.290E+00,0.060,0 @ASNOAA/PMEL TMAP !     go
remove_logo  ==> equivalent to these
ppl labs/nouser,7.790E+00,7.190E+00,0.060,0 @ASMay 17 2012 10:14:35 !
                      3 lines
ppl labs/nouser,0.000E+00,6.990E+00,0.120,0 @ASZ : 0 !  removes
information about two axis/dims othernioa_clim
ppl labs/nouser,0.000E+00,6.790E+00,0.120,0 @ASTIME : 15-JAN 00:00
NOLEAP !     than that on x and y axes from top-left corner
ppl labs/nouser,7.790E+00,6.790E+00,0.120,0 @ASDATA SET ! removes data
set name from top-right corner

ppl fill
.......................................................

========================================================



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

Privacy Policy | Disclaimer | Accessibility Statement