Straw poll on default offset text precision

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-users/attachments/20160105/3443ab82/attachment.html>

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.

I don't think that displaying those zeros is a net gain, but I don't
feel strongly either way.

Eric

ยทยทยท

On 2016/01/05 3:31 AM, Antony Lee wrote:

Thoughts?

Antony

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
Matplotlib-devel Info Page