removing label bar

From: Sara Rauscher <rauscher_at_nyahnyahspammersnyahnyah>
Date: Thu, 18 Jun 2009 15:42:11 -0600

Hi,
I am running a ncl script that produces three plots on a page. I want to
turn off the label bars on the top two panels. When I do this using

res_at_lbLabelBarOn = False

as directed at
https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_lat_time.shtml

the label bars turn off, but contour labels suddenly appear on the
panels, and the last label bar (which I turn on using
res_at_lbLabelBarOn = True) is only partially displayed. I've attached
two figures - the only difference in the two scripts was commenting out
the "res_at_lbLabelBarOn = False" line. This happened even when I
wasn't overlaying plots.

The graphics part of the script is pasted below. Any help is appreciated.
thanks
sara

;data processing

wks = gsn_open_wks ("ps", "lat_month" )
 plot = new(3,graphic)
  plot1 = new(3,graphic)
  gsn_define_colormap(wks, "BrownBlue12") ; use color map

 res = True ; plot mods desired
 res_at_gsnDraw = False
 res_at_gsnFrame = False
 res_at_cnFillOn = True ; color on
; res_at_lbLabelBarOn = False
;res_at_lbLabelStride = 4 ; every other label
;res_at_pmLabelBarOrthogonalPosF = -0.04 ; move label bar closer to axis
 res_at_cnLinesOn = False ; turn off contour lines
 res_at_gsnSpreadColors = True ; use full range of color map
 res_at_cnInfoLabelOn = False ; turn off contour info label

 res_at_cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels
 res_at_cnLevels = (/-6.,-5,-4,-3,-2,-1,0,1,2,3,4,5,6/)
  res_at_tmXBMode = "Explicit" ; explicit labels
  res_at_tmXBValues = a2pd_avg&month ; location of labels
  res_at_tmXBLabels = months ; labels themselves
  res_at_tmLabelAutoStride = True ; nice stride on labels

  res_at_txFont = 21
  res_at_tmXBLabelFont = 21
  res_at_tmYLLabelFont = 21
  res_at_lbLabelFont = 21

  res_at_vpXF = 0.12 ; default is 0.2 (aspect ratio)
  res_at_vpYF = 0.8 ; default is 0.8
  res_at_vpHeightF = 0.4 ; default is 0.6
  res_at_vpWidthF = 0.75 ; default is 0.6

; Resources for prob plots
  res2 = True ; res2 probability plots

  res2_at_gsnDraw = False ; Do not draw plot
  res2_at_gsnFrame = False ; Do not advance frome

  res2_at_cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
  res2_at_cnMinLevelValF = 0.00 ; set min contour level
  res2_at_cnMaxLevelValF = 1.05 ; set max contour level
  res2_at_cnLevelSpacingF = 0.05 ; set contour spacing

  res2_at_cnInfoLabelOn = False ; turn off info label

  res2_at_cnLinesOn = False ; do not draw contour lines
  res2_at_cnLineLabelsOn = False ; do not draw contour labels

  res2_at_cnFillScaleF = 0.6 ; add extra density
  siglevel = 0.1
  plot(0) = gsn_csm_lat_time(wks, diffall, res)
  plot1(0) = gsn_csm_contour(wks,pd_ttest, res2)
  plot1(0) = ShadeLtContour(plot1(0), siglevel, 17) ; shade all areas
less than the
  overlay (plot(0), plot1(0))
  plot(1) = gsn_csm_lat_time(wks, diffland, res)
  plot1(1) = gsn_csm_contour(wks,pd_land_ttest, res2)
  plot1(1) = ShadeLtContour(plot1(1), siglevel, 17) ; shade all areas
less than the
  overlay (plot(1), plot1(1))
  res_at_lbLabelBarOn = True
  plot(2) = gsn_csm_lat_time(wks, diffocean, res)
  plot1(2) = gsn_csm_contour(wks,pd_ocean_ttest, res2)
  plot1(2) = ShadeLtContour(plot1(2), siglevel, 17) ; shade all areas
less than the
  overlay (plot(2), plot1(2))
  gsn_panel(wks,plot,(/3,1/),False)
end

-- 
Sara A. Rauscher
T-3 Fluid Dynamics
MS B216
Los Alamos National Lab
Los Alamos, NM 87545 USA
(505) 606-0512



_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

label_bar_off.png label_bar_on.png
Received on Thu Jun 18 2009 - 15:42:11 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 22 2009 - 15:36:10 MDT