Labelbar ordering in gsn_labelbar_ndc

From: Xin Xi <xxi_at_nyahnyahspammersnyahnyah>
Date: Sat Nov 16 2013 - 11:34:56 MST

This is a trivial problem, but how can one change the order of labelbar to
be the same as in the plot using gsn_labelbar_ndc function, for example,
in the attached plot, how to make it appear from a) to d) (in vertical
order), instead of from d) to a). I use the following script for plotting
I can fix it by drawing the bars one by one, but it needs a lot of tuning
of the bar width and y position to make the bar alignment and width look
like this plot.


; legend labels
  getvalues plot1 ; get plot size for use in creating
  "vpXF" : vpx
  "vpYF" : vpy
  "vpHeightF" : vph
  "vpWidthF" : vpw
  end getvalues
  lbw = 0.4 * vpw ; Make labelbar size a fraction of the plot.
  lbh = 0.5 * vph
  nboxes = dimsizes(colors)

  lbres = True
  lbres@vpWidthF = 0.15*vpw
  lbres@vpHeightF = 0.3*vph
  lbres@lbBoxMajorExtentF = 0.4
  lbres@lbFillColors = colors
  lbres@lbMonoFillPattern = True
  lbres@lbLabelFontHeightF = 0.014
  lbres@lbLabelJust = "CenterLeft"
  ;lbres@lbPerimOn = False

  labels =.....


ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

Received on Sat Nov 16 11:35:12 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 22 2013 - 09:36:32 MST