[ncl-talk] one colorbar with two groups of labels

Adam Phillips asphilli at ucar.edu
Thu Aug 27 14:06:16 MDT 2015


Hi Jian,
Looking back at the script that created that figure, I called gsn_panel
twice to draw each column of figures. I then (through trial and error)
overlaid the two labelbars on one another, and pushed the 2nd set of
labelbar labels farther away from the labelbar(s). The key was setting the
panel resource lists correctly, and of course using the same number of
contours and the exact same colors for each labelbar.

Here's the relevant snippets from the code:
yres at gsnPanelLeft = 0.1
yres at gsnPanelRight = 0.5
yres at pmLabelBarParallelPosF = .24
gsn_panel(wks,map,(/3,1/),yres)

yres at gsnPanelLeft = 0.5
yres at gsnPanelRight = 0.9
yres at pmLabelBarParallelPosF = -.15
yres at lbLabelOffsetF = 0.36
gsn_panel(wks,map2,(/3,1/),yres)

Notice I used lbLabelOffsetF to push the 2nd set of labels farther away
from the labelbar.

Hope that helps!
Adam


On Wed, Aug 26, 2015 at 10:31 PM, Jian Zheng <jzheng8606 at gmail.com> wrote:

> Hi NCLers,
>
> Does anyone know how to draw a colorbar with two groups of labels
> (represent two variables). I attach an example figure (from Deser and
> Phillips 2009). One method may be adding the labels one by one, but I don't
> know how to get the location for each label. Are there any other ways to
> draw a similar colorbar?
>
> Thanks in advance.
> Jian
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150827/4f5e7b1a/attachment.html 


More information about the ncl-talk mailing list