Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Minor offsetText formatting improvement #4451

Copy link
Copy link
Open
@anntzer

Description

@anntzer
Issue body actions

Currently, the axis offset text is always typeset with the format string "%1.10e" followed by some crazy postprocessing in ScalarFormatter._formatSciNotation. I would suggest switching to some "%g"-based format, so that e.g. 1234 doesn't get formatted as "1.234e3" which can hardly be described as "more legible". Probably _formatSciNotation could be simplified a bit too.

Simple example:

python -c 'from pylab import *; plot(*[1234 + arange(10)] * 2); show()'

Edit: the above is now fixed by the switch of axes.formatter.offset_threshold to 4, but the issue remains with

python -c 'from pylab import *; plot(*[12.321 + arange(5) * .001] * 2); show()'

test
where the offset text should be "12.320" (or at least "12.32"), not "1.232e1".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.