creating label bar with labelbar_ndc

From: Ivan Lima <ivan_at_nyahnyahspammersnyahnyah>
Date: Tue, 17 Apr 2007 13:54:47 -0400

  Hi all,

  I'm trying to create a label bar for a panel figure using
  labelbar_ndc. The different plots in the panel have different
  sizes, so Ngl.panel does not work well in this case. I create
  the panel plot using vpXF, vpYF, vpWidthF and vpHeightF and add
  the label bar using 'labelbar_ndc'. The problem is that the
  label bar, which has 12 boxes, seems to be using only the first
  12 colors of the colormap I'm using. The first box in the label
  bar is black and the rest are slightly different shades of
  blue. How do I make it use all of the colormap. Below is a
  snipet of the code I'm using:

clevels = [0.01,0.02,0.03,0.04,0.05,0.075,0.1,0.15,0.2,0.25,0.3]
clabels = ['0.01','0.02','0.03','0.04','0.05','0.075','0.1','0.15','0.2',\
           '0.25','0.3']

# label bar resources
lbres = Ngl.Resources()
lbres.vpWidthF = 0.825
lbres.vpHeightF = 0.10
lbres.lbMonoFillPattern = True
lbres.lbOrientation = 'Horizontal'
lbres.lbLabelAlignment = 'InteriorEdges'
lbres.nglDraw = False
lbres.nglFrame = False

wres = Ngl.Resources()
wres.wkColorMap = "BlAqGrYeOrReVi200"

# create label bar
lb = Ngl.labelbar_ndc(wks,12,clabels,0.1,0.15,lbres)

  Any help/suggestions are greatly appreciated.

  Thanks,

  - Ivan

-- 
Ivan Lima
Woods Hole Oceanographic Institution, MC&G MS #25
360 Woods Hole Road, Woods Hole, MA 02543-1543 USA
_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Tue Apr 17 2007 - 11:54:47 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 17 2007 - 15:42:04 MDT