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

Skip to content

Deprecate axes_grid1.colorbar (in favor of matplotlib's own). #13397

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
merged 1 commit into from
Aug 19, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 9, 2019

See changelog note for rationale (looks like the mpl_toolkits colorbar
implementation was copy-pasted a while ago, and then did not get most of
the recent improvements to matplotlib's colorbar).

May be worth adding a property to the builtin colorbar similar to
mpl_toolkit's cbar_axis (pointing to whichever of xaxis or yaxis
is the long axis).

I don't think supporting overdrawing multiple colorbars on a single Axes
is really worth it.

Manual examination of axisartist/axes_grid1 examples that use colorbars
show no difference.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 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

# The original version of this test relied on mpl_toolkits's slightly different
# colorbar implementation; moving to matplotlib's own colorbar implementation
# caused the small image comparison error.
@pytest.mark.parametrize("legacy_colorbar", [False, True])
Copy link
Member

Choose a reason for hiding this comment

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

You don't want to just change the image?

Otherwise, I'm onboard for this!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You know I really, really don't like adding/changing baseline images... hence the check_images_equal decorator, etc.

Copy link
Member

@QuLogic QuLogic Mar 4, 2020

Choose a reason for hiding this comment

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

This parametrization makes the test flaky in parallel, as one can overwrite the test file of another process. We only use duplicate file names in the image_comparison decorator for that reason.

@anntzer anntzer force-pushed the axes_grid1.colorbar branch from 13cc45e to 8be8810 Compare April 16, 2019 09:18
@anntzer anntzer added this to the v3.2.0 milestone Apr 16, 2019
@anntzer anntzer force-pushed the axes_grid1.colorbar branch from 8be8810 to e9a4166 Compare July 6, 2019 21:34
@anntzer anntzer force-pushed the axes_grid1.colorbar branch 2 times, most recently from 05127ec to d43cb34 Compare July 7, 2019 08:49
See changelog note for rationale (looks like the mpl_toolkits colorbar
implementation was copy-pasted a while ago, and then did not get most of
the recent improvements to matplotlib's colorbar).

May be worth adding a property to the builtin colorbar similar to
mpl_toolkit's `cbar_axis` (pointing to whichever of `xaxis` or `yaxis`
is the long axis).

I don't think supporting overdrawing multiple colorbars on a single Axes
is really worth it.

Manual examination of axisartist/axes_grid1 examples that use colorbars
show no difference.
@anntzer anntzer force-pushed the axes_grid1.colorbar branch from d43cb34 to 9a8ec76 Compare August 8, 2019 19:33
@jklymak jklymak added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Aug 12, 2019
@tacaswell tacaswell merged commit 08ac6e9 into matplotlib:master Aug 19, 2019
@anntzer anntzer deleted the axes_grid1.colorbar branch August 19, 2019 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: color/colorbar topic: mpl_toolkit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants