Skip to content

Deprecate parameters to colorbar which have no effect. #16051

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
Jan 3, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Dec 30, 2019

Per changelog entry.

I went for a custom helper in colorbar.py rather than a more general one
in cbook as this allowed for a nicer message, and making the general
helper handle the deprecation would be a bit unwieldy.

Supersedes #5056.

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

@anntzer anntzer added this to the v3.3.0 milestone Dec 30, 2019
@timhoffm
Copy link
Member

flake8:

./lib/matplotlib/colorbar.py:1209:5: E303 too many blank lines (2)

@anntzer
Copy link
Contributor Author

anntzer commented Dec 31, 2019

thanks, rebased.

@anntzer anntzer force-pushed the effectless-cbar-kwargs branch from 94acd23 to 799d7b0 Compare December 31, 2019 13:56
@@ -1155,6 +1155,16 @@ def remove(self):
self.ax.remove()


def _merge_disjoint_kwargs(d, **kwargs):
for k, v in kwargs.items():
Copy link
Member

Choose a reason for hiding this comment

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

Should get a docstring. In particular, it should mention that d is a dict and is updated with kwargs. Also, I'd rather use _add_disjoint_kwargs. "merge" sounds more like it would return a new dict with the merged content.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, done

@anntzer anntzer force-pushed the effectless-cbar-kwargs branch from 799d7b0 to 2919363 Compare December 31, 2019 21:39
Per changelog entry.

I went for a custom helper in colorbar.py rather than a more general one
in cbook as this allowed for a nicer message, and making the general
helper handle the deprecation would be a bit unwieldy.
@anntzer
Copy link
Contributor Author

anntzer commented Jan 3, 2020

rebased

@jklymak jklymak merged commit 709ba77 into matplotlib:master Jan 3, 2020
@anntzer anntzer deleted the effectless-cbar-kwargs branch January 3, 2020 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants