Hi Andrew,
With labels that potentially have numbers, like tickmark labels and labelbar labels, there's usually a corresponding "yyXXXFormat" resource that allows you to format the numeric values different ways.
It's not very obvious what this resource is for labelbar labels, since it's tied in with the contour plot. The resource is "cnLineLabelFormat" and you can set it as follows:
res.cnLineLabelFormat = "0@;*.2f"
You can see the "format.py" example for various ways that you can use the Format resources:
http://www.pyngl.ucar.edu/Examples/gallery.shtml
--Mary
On Aug 30, 2011, at 5:31 AM, Andrew Dawson wrote:
> Hi,
>
> How can I control the format of the label bar labels when making a filled contour plot? I don't like the appearance of the attached plot because it uses '.5' and I would prefer '0.5'. I have tried using the resource 'lbLabelStrings' but it doesn't seem to do anything. I attached an example script, which tries to change the format of the labels using this resource.
>
> Any guidance would be appreciated,
> Andrew
>
>
>
> --
> Dr Andrew Dawson
> Atmospheric, Oceanic & Planetary Physics
> Clarendon Laboratory
> Parks Road
> Oxford OX1 3PU, UK
> Tel: +44 (0)1865 282438
> Email: dawson@atm.ox.ac.uk
> Web Site: http://www2.physics.ox.ac.uk/contacts/people/dawson
>
> <lbLabels.png><lbLabelStrings_test.py>_______________________________________________
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Tue Aug 30 08:07:45 2011
This archive was generated by hypermail 2.1.8 : Mon Sep 12 2011 - 16:03:35 MDT