Skip to content

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

Merged
ImportanceOfBeingErnest merged 2 commits into
matplotlib:masterfrom
jklymak:fix-minor-log-formatter
Oct 13, 2018
Merged

ImportanceOfBeingErnest merged 2 commits into
matplotlib:masterfrom
jklymak:fix-minor-log-formatter

Conversation

@jklymak

@jklymak jklymak commented Oct 12, 2018 •

Copy link
Copy Markdown
Member

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

@ImportanceOfBeingErnest ImportanceOfBeingErnest left a comment

Copy link
Copy Markdown
Member

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