Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FIX: make minor ticks formatted with science formatter as well #12507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Oct 12, 2018

PR Summary

Closes #12488

Wrong formatter was being assigned....

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors

fig, ax = plt.subplots()
pcm = ax.imshow([[10000, 50000]], norm=mcolors.LogNorm())
cb = fig.colorbar(pcm)
plt.show()

Before:

boo

After:

tetslog

  • Needs test

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant

@jklymak jklymak added this to the v3.0.x milestone Oct 12, 2018
Copy link
Member

@ImportanceOfBeingErnest ImportanceOfBeingErnest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is indeed useful to have the LogFormatterSciNotation for major and minor labels on colorbars as well, just as with usual axes.

@ImportanceOfBeingErnest ImportanceOfBeingErnest merged commit 025e4f9 into matplotlib:master Oct 13, 2018
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 13, 2018
timhoffm pushed a commit that referenced this pull request Oct 13, 2018
@jklymak jklymak deleted the fix-minor-log-formatter branch October 22, 2018 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants