! bn_center_key_labels
!  6/2014
!
! Arguments to /KEY qualifier on color plots
! /CENTERLABEL  for label between lines on colorbar
! /HORIZONTAL   for horizontal key 

use levitus_climatology.cdf
shade/lev=10/key=cent,horiz temp
fill/lev=10v/key=cent temp

! Ribbon plots and all three keywords: centerlab, horizontal, continuous
let/title=xpts xpts = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35}
let/title=ypts ypts = { 9.04,8.67,8.96,9.29,9.18,9.42,9.43,\
9.33,9.19,9.22,9.12,9.36,9.22,9.04,8.92,9.00,8.59,8.31,8.69,\
8.20,8.86,7.98,7.80,8.29,7.94,8.05,7.85,7.55,7.56,6.82,7.04,\
6.66,6.56,7.36,6.52}
let/title=colors  var =  {\
1.5,1.6,1.8,2.5,2.6,3.7,3.8,14.9,14.1,5.3,16.1,16.2,17.3,\
17.4,8.4,8.2,9.5,9.1,10.1,10.2,12.2,12.6,1.7,1.1,5.2,5.3,\
5.4,13.6,13.7,14.8,14.2,14.9,14.7,14.6,14.5}
RIBBON/vs/line/thick/lev=(1,20,1)/fast/pal=ten_by_levels/key=center,horiz,cont xpts,ypts,var

! Automatically restore non-continuous key, non-center, vertical
RIBBON/vs/line/thick/lev=(1,20,1)/fast/pal=ten_by_levels/key xpts,ypts,var

! Polygons: the polymark script needs multiple key qualifiers to be in quotes.
use coads_climatology
def axis/x=0:360:5 xq
def axis/y=-90:90:4 yq
let fsst =  sst[l=1,gx=xq,gy=yq]

let lon = xsequence(x[gx=xq] + 0*y[gy=yq])
let lat = xsequence(0*x[gx=xq] + y[gy=yq])
shade/nokey/pal=white/nolab/axes=0,0,0,0 fsst  ! set up 

go polymark poly/key="horiz,center"/title="polygons"/lev=(-inf)(4,26,1)(inf), lon, lat, xsequence(fsst), square, 0.4
can data coads_climatology

! Automatically restore regular handling of levels
shade temp

