Skip to content
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

FIX: colorbar check for constrained layout #10594

Merged
merged 2 commits into from Feb 25, 2018

Conversation

Projects
None yet
3 participants
@jklymak
Copy link
Contributor

commented Feb 25, 2018

PR Summary

Fixes #10582

import matplotlib.pyplot as plt
import numpy as np

gx = np.linspace(-5, 5, 10)
img = np.hypot(gx, gx[:, None])

fig = plt.figure()
ax = fig.add_axes([0, 0, 1, 1])
mesh = ax.pcolormesh(gx, gx, img)
plt.colorbar(mesh)

plt.show()

failed with an attribute error. This is the most straightforward way of checking for that.

Not sure if this should have a test or not. Seems that maybe pyplot-created colorbars are not tested if this one got through the test suite...

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@jklymak jklymak requested a review from dopplershift Feb 25, 2018

@jklymak jklymak added this to the v2.2.0 milestone Feb 25, 2018

@jklymak

This comment has been minimized.

Copy link
Contributor Author

commented Feb 25, 2018

... interestingly there is no test_pyplot. Are we to check the pyplot interface in the relevant subsections? Seems ripe for someone to come along, convert to non-pyplot, and destroy the test.

@jklymak

This comment has been minimized.

Copy link
Contributor Author

commented Feb 25, 2018

Test added to constrained_layout

@efiring efiring merged commit 03b8e19 into matplotlib:master Feb 25, 2018

8 checks passed

ci/circleci: docs-python35 Your tests passed on CircleCI!
Details
ci/circleci: docs-python36 Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 50%)
Details
codecov/project/library 66.99% (target 50%)
Details
codecov/project/tests 98.39% (+<.01%) compared to 72770e6
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
lgtm analysis: Python No alert changes
Details

meeseeksdev bot pushed a commit that referenced this pull request Feb 25, 2018

tacaswell added a commit that referenced this pull request Feb 25, 2018

@jklymak jklymak referenced this pull request Mar 8, 2018

Closed

Try matplotlib RC #19702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.