[ncl-talk] problem with explicit label strings

Anne anne.seidenglanz at unive.it
Sun Feb 3 08:10:21 MST 2019


Hi again,

I think I found a solution to my problem. I think the key resource that I
forgot to set is  res at lbLabelAutoStride     =    False. Together with
following resources I got the labelling the way I wanted (here an example
in which I set explicit contour levels):

res at lbLabelAutoStride     =    False
res at lbLabelFontHeightF          =  0.025
res at cnLevelSelectionMode = "ExplicitLevels"
res at cnFillColors       =  (/2, 25, 50, 75, -1, -1, 160, 180, 200, 220/)
res at cnLevels           =  (/-0.2, -0.15, -0.1, -0.5, 0, 0.5, 1.0, 1.5, 2.0/)
res at cnExplicitLabelBarLabelsOn = True
res at lbLabelStrings = (/"-0.2", "", "-0.1", "", "0", "", "1.0", "", "2.0",
"2.5"/)

Hope that helps,
Anne


On Sun, Feb 3, 2019 at 3:46 PM Anne <anne.seidenglanz at unive.it> wrote:

> Hi,
>
> I have used
>
> res at cnExplicitLabelBarLabelsOn = True
> res at lbLabelStrings = (/-0.2, -0.15, -0.1, -0.5, 0.5, 1.0, 1.5, 2.0/)
>
> to get explicit label bar labels. That seems to work fine only if I
> comment or set lbLabelFontHeightF to quite small so each label can fit on
> the label bar. However, this way the labels are way to small and also I
> feel they would still fit if I had chosen a larger font height.
> I attach 2 plots, one where I commented lbLabelFontHeightF which results
> in very small labels, and one which it automatically skips some of my
> explicitly set labels because they're too big.
>
> Is there a solution to this problem?
>
> Even if I do (res at lbLabelStrings = (/"-0.2", "-0.15", "",
> "-0.5","0.5","","1.5","2.0"/) doesn't do what I want. I also set
> lbAutoManage to False but this didn't make a difference.
>
> My ultimate goal is to have labels *symmetric* around zero (also every 2nd
> is fine), and they must be BIG enough.
>
> Thanks for any help!
> Anne
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190203/16a785ec/attachment.html>


More information about the ncl-talk mailing list