[ncl-talk] Legend in panel plot

Mary Haley haley at ucar.edu
Fri Aug 19 10:36:31 MDT 2016


Hi,

The issue is that by default, the labels on the labelbar are drawn in
"InteriorEdges" mode, and you want to use "BoxCenters" mode.

Please see the second frame in example lb_14.ncl at:

http://www.ncl.ucar.edu/Applications/labelbar.shtml#ex14

I think all you need is:

  res at lbLabelAlignment = "BoxCenters"
  res at lbLabelStrings      =
(/"Arid","Semi-arid","Mediterranean","Semi-humid","Humid","Very
Humid","Extremely Humid"/)

You may also want to look at the "classification data" examples page:

http://www.ncl.ucar.edu/Applications/classification.shtml

and in particular, example "permafrost_1.ncl", which has an explicitly
labeled labelbar.

--Mary


On Fri, Aug 19, 2016 at 9:36 AM, jagan TNAU <jagan at tnau.ac.in> wrote:

> Dear NCL users,
>
> I am trying a panel plot of Aridity Index of a specific regions with its
> sub divisions. The original script was provided to me by Mary. There is no
> issue in generating panel plots. However, I want to display contour levels
> as there is a suggested classification for the Aridity Index as below
>
> Arid   0-10
> Semi-arid 11-20
> Mediterranean 21-24
> Semi-humid 25-28
> Humid 29-35
> Very Humid 36-55
> Extremely Humid > 56
>
> Through cnLevels resource and "ExplicitLevels" I was able to set levels
> like res at cnLevels = (/0.,10.,20.,24.,28.,35.,55./). But I did not find
> any examples that can use the range as above and use the legend class like
> Arid, Semi Arid etc and not merely numbers.
>
> Is it possible to create plots with legend with classification name as
> above. Please find attached the script and plot I have created.
>
> --
> With regards
>
> Dr.R.Jagannathan
> Professor & Former Dean
> Tamil Nadu Agricultural University
> Coimbatore - 641 003 India
>
> PHONE:  Mob: +91 94438 89891
>
> DO NOT PRINT THIS E-MAIL UNLESS NECESSARY. THE ENVIRONMENT CONCERNS US ALL.
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160819/a1e692bb/attachment.html 


More information about the ncl-talk mailing list