[ncl-talk] "Padding" Y axis tickmark labels to match w/ different number of digits
Colin Zarzycki
zarzycki at umich.edu
Tue Jun 23 15:24:01 MDT 2015
Hi all,
I am creating a 4x4 tile of XY plots generated in NCL for use in a LaTeX
figure (technically, a table inside a figure).
I require the figures to be of identical size. However, the fact that the
Y-axis labels have different numbers of maximum digits between the two
panels seems to be problematic in getting the figures to match in size.
I have attached two figures that highlight this problem. If I just leave
NCL to generate the tickmarks as default, I get the figure where the XY
boxes differ in size (when scaled to fit in the 4x4 table). This appears to
occur because, for example, the Y axis in panel (a) has 2 digits while the
Y axis in panel (c) has 4 digits.
If I manually override NCL's defaults such that the Y tickmark labels have
matching a precision of 4 (set tiYAxisOffsetXF to False), the problem is
(mostly) alleviated. However, this creates the problem of having extraneous
decimal points instead of integer values in the labels.
Is there a way I can essentially "pad" the Y-axis label such that they take
up the same size regardless of how many digits NCL actually prints? I have
tried tiYAxisOffsetXF to try and force the white space to be controlled by
the Y axis title, but apparently the NDC coordinates scale with number of
Y-axis tickmark digits as well, so it doesn't solve the problem.
Cheers,
-Colin
--
Colin M. Zarzycki, ASP postdoctoral fellow
Atmospheric Modeling and Predictability
National Center for Atmospheric Research
http://www.colinzarzycki.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150623/10f711ab/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yaxis_diffprecision.png
Type: image/png
Size: 116838 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150623/10f711ab/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yaxis_sameprecision.png
Type: image/png
Size: 121164 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150623/10f711ab/attachment-0003.png
More information about the ncl-talk
mailing list