# Re: [ferret_users] Problem in removing labels

Hi,

Thanks. Now I can mask the land in all the subplots.

Thanks,
Sudev
On Tue, May 22, 2012 at 10:00 PM, Ansley Manke wrote:
Hi -
You would call "go fland" after each plot.   Try this (and you'll see a problem that I'll show how to solve, below):

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

! 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

go fland

label/nouser `(\$ppl\$xlen)/2`, `(\$ppl\$ylen)-0.2`,0,0,0.12,"January"

...

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`
go fland

and so forth, with "go fland" after each shade command.

It would work successfully with "go land" because that's just drawing  line. But if we use fland, then that's drawing a fill plot. When we use /LEV to keep constant color levels, Ferret just takes the color levels from the previous plot (the filled land), and uses the same levels again.  The answer is to just give the levels directly in each shade command. A good way to do that is to define a symbol with the levels setting and use that.  Try this version, where I define a symbol with the color levels to use in all the SST plots.
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

! Draw 6 months of plots. Define a symbol with the color levels to use
! for all panels.

define symbol sst_levels = (-inf)(0,30,1)(inf)

! Make a label above each plot with the month.

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

go fland

label/nouser `(\$ppl\$xlen)/2`, `(\$ppl\$ylen)-0.2`,0,0,0.12,"January"

! This symbol is defined with every 2D plot command using open-ended levels:

go fland

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

go fland

label/nouser `(\$ppl\$xlen)/2`, `(\$ppl\$ylen)-0.2`,0,0,0.12,"March"

ppl axlabp,0,0  ! No axis labels

go fland

label/nouser `(\$ppl\$xlen)/2`, `(\$ppl\$ylen)-0.2`,0,0,0.12,"April"

go fland

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.

ppl shakey 1 1 .12 1 3 9 `(\$ppl\$xlen)+1+.5` `(\$ppl\$xlen)+1+1` 1.4 `1.4+3*(\$ppl\$ylen)+1`
go fland

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/21/2012 10:07 PM, Sudev Das M P wrote:
Hai,

Thanks for the script. I tried this script with my data and it is working fine. I also want to mask the land.

When I used the command "go fland" or "go land" only in the first subplot land is masked, remaining

subplots it is showing error. How can I use the land mask command in the above script. Please give your

suggestion.

Thanks,
sudev

On Sat, May 19, 2012 at 1:10 AM, Ansley Manke wrote:
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

! 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

label/nouser `(\$ppl\$xlen)/2`, `(\$ppl\$ylen)-0.2`,0,0,0.12,"January"

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

label/nouser `(\$ppl\$xlen)/2`, `(\$ppl\$ylen)-0.2`,0,0,0.12,"March"

ppl axlabp,0,0  ! No axis labels

label/nouser `(\$ppl\$xlen)/2`, `(\$ppl\$ylen)-0.2`,0,0,0.12,"April"

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.

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`
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
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
.......................................................

========================================================
```