Skip to content

FIX: pass colorbar.set_ticklabels down to long_axis#20758

Merged
QuLogic merged 1 commit into
matplotlib:masterfrom
jklymak:fix-pass-colorbar-set_ticklabels
Jul 29, 2021
Merged

FIX: pass colorbar.set_ticklabels down to long_axis#20758
QuLogic merged 1 commit into
matplotlib:masterfrom
jklymak:fix-pass-colorbar-set_ticklabels

Conversation

@jklymak

@jklymak jklymak commented Jul 28, 2021

Copy link
Copy Markdown
Member

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 jklymak added the API: consistency Consistency of the matplotlib API, including naming, behavior, defaults, … label Jul 28, 2021
@jklymak

jklymak commented Jul 28, 2021

Copy link
Copy Markdown
Member Author

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
Comment thread lib/matplotlib/colorbar.py Outdated
Comment thread lib/matplotlib/colorbar.py Outdated
Comment thread lib/matplotlib/colorbar.py Outdated
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
Copy Markdown
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
Copy Markdown
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
Comment thread lib/matplotlib/colorbar.py Outdated
@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

Labels

API: consistency Consistency of the matplotlib API, including naming, behavior, defaults, … topic: color/colorbar topic: ticks axis labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

colorbar set_ticklabels - text properties not working

3 participants