Re: Problem with cnLabelBarEndStyle

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri May 20 2011 - 07:51:17 MDT

Hi Arne,

What version of PyNGL are you running? I just tried your script and got the attached PS file.
This was with PyNGL 1.3.1.

--Mary

On May 20, 2011, at 4:58 AM, Arne Kriegsmann wrote:

> I am trying to use different styles of the colorbar. With pyngl, the value of
> cnLabelBarEndStyle defines the style of the end of the colorbar.
> Only one of the three possible values works ("IncludeOuterBoxes"). The other
> two values ("IncludeMinMaxLabels", "ExcludeOuterBoxes") generate not all of
> labels for the colorbar. The second largest as well as the second smallest
> value is missing.
>
>
>
> import sys,os
> import Nio
> import Ngl
>
> cdf_file =
> Nio.open_file(os.path.join(Ngl.pynglpath("data"),"cdf","contour.cdf"),"r")
> Z = cdf_file.variables["Z"] # geopotential height
>
> wkres = Ngl.Resources()
> wkres.wkColorMap = "default"
> wks_type = "ps"
> wks = Ngl.open_wks(wks_type,"ngl02p",wkres)
>
> resources = Ngl.Resources()
> resources.cnFillOn = True # Turn on contour line fill.
> resources.cnMonoFillPattern = True # Turn solid fill back on.
> resources.cnLineLabelsOn = False # Turn off line labels.
>
> #resources.cnLabelBarEndStyle = "IncludeMinMaxLabels"
> resources.cnLabelBarEndStyle = "IncludeOuterBoxes"
> #resources.cnLabelBarEndStyle = "ExcludeOuterBoxes"
>
> plot = Ngl.contour(wks,Z[0,0,:,:],resources) # Draw a contour plot.
>
> Ngl.end()
>
>
> Thanks
> Arne
> <includeouterboxes.jpg><excludeouterboxes.jpg><includeminmaxlabels.jpg>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Fri May 20 07:51:38 2011

This archive was generated by hypermail 2.1.8 : Wed May 25 2011 - 09:35:33 MDT