[Matplotlib-devel] Straw poll on default offset text precision

Antony Lee antony.lee at berkeley.edu
Tue Jan 5 08:31:00 EST 2016


Currently, after e.g. `plot([10000000, 10000010])`, the y-axis is labeled
"0, ..., 10 + 1e7".  The physicist in me always thought that this was
inelegant, as the offset is specified with much less precision than the
increments.

Yes, I know, there are physical cases where this makes sense, but here this
is really just due to "sloppy" formatting: after `plot([12345671,
12345678])`, the y-axis is labeled "0, ..., 7 + 1.2345671e7", so both the
offset and the increments have the same precision (ideally, perhaps the
offset should be written with the same exponent as the increments, so just
1,234,567 here).

Although the issue is "relatively" easy to fix, this will give rise to a
lot of zeros in pathological cases such as `plot([.5, .50000001])`
(currently 0, ..., 1 x 1e-8 + 5e-1, but 0, ..., 1 x 1e-8 + 0.50000000 after
the change).  But again, perhaps it makes more sense to actually display
these zeros.

Thoughts?

Antony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20160105/3443ab82/attachment.html>


More information about the Matplotlib-devel mailing list