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: pass colorbar.set_ticklabels down to long_axis #20758

Merged
merged 1 commit into from Jul 29, 2021

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Jul 28, 2021

PR Summary

Closes #20296

colorbar.set_ticklabels is now just an alias to colorbar._long_axis().set_ticklabels except it also has a deprecated kwarg.

Not sure if this really needs an API change or not - its just making the set_ticklabels the same as it is on axis.set_ticklabels.

Also updated colorbar.set_ticks to be the same as the axis command.

@jklymak jklymak added this to the v3.5.0 milestone Jul 28, 2021
@jklymak jklymak force-pushed the fix-pass-colorbar-set_ticklabels branch 2 times, most recently from 490ef8e to 0a66897 Compare July 28, 2021 20:23
@jklymak jklymak marked this pull request as draft July 28, 2021 20:25
@jklymak jklymak force-pushed the fix-pass-colorbar-set_ticklabels branch from 3377790 to 198a0d7 Compare July 28, 2021 20:46
@jklymak
Copy link
Member Author

jklymak commented Jul 28, 2021

I think this is a start, but we do have a bit of funkiness about colorbar.locator/formatter versus the locator/formatter that is on the _long_axis().

@jklymak jklymak marked this pull request as ready for review July 28, 2021 21:21
lib/matplotlib/colorbar.py Outdated Show resolved Hide resolved
lib/matplotlib/colorbar.py Outdated Show resolved Hide resolved
lib/matplotlib/colorbar.py Outdated Show resolved Hide resolved
Comment on lines -827 to -828
The tick positions can be hard-coded by an array of values; or
they can be defined by a `.Locator`. Setting to *None* reverts
Copy link
Member

Choose a reason for hiding this comment

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

Accepting a Locator is (intentionally?) no longer documented.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, I didn't want to break API, however, axis.set_ticks does not take a locator so far as I can tell.

@jklymak jklymak force-pushed the fix-pass-colorbar-set_ticklabels branch from 198a0d7 to d19c8b7 Compare July 29, 2021 04:58
lib/matplotlib/colorbar.py Outdated Show resolved Hide resolved
@jklymak jklymak force-pushed the fix-pass-colorbar-set_ticklabels branch from d19c8b7 to cd5e222 Compare July 29, 2021 05:05
@jklymak jklymak force-pushed the fix-pass-colorbar-set_ticklabels branch from cd5e222 to c64c852 Compare July 29, 2021 05:06
@QuLogic QuLogic merged commit a254f83 into matplotlib:master Jul 29, 2021
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.

colorbar set_ticklabels - text properties not working
3 participants