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

Skip to content

outline attribute of colorbar not documented #19946

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

Closed
story645 opened this issue Apr 12, 2021 · 7 comments
Closed

outline attribute of colorbar not documented #19946

story645 opened this issue Apr 12, 2021 · 7 comments

Comments

@story645
Copy link
Member

Was trying to change the color of the outline of my colorbar:
image

and wasn't clear in the docs how to do it, but found on stackoverflow that there's an outline attribute that is the collection of spines:

 self.outline = ax.spines['outline'] = _ColorbarSpine(ax)

around the colorbar (and is not the same spines as the axes containing the colorbar since I tried that and it didn't work.)

@jklymak
Copy link
Member

jklymak commented Apr 12, 2021

Note #18900 will likely change this behaviour to be exactly the same as any other axes...

@QuLogic
Copy link
Member

QuLogic commented Apr 13, 2021

With the new Axes.spines shortcut, you can use ax.spines[:].set_color('red') on any Axes without worrying about the names.

@anushkrishnav
Copy link
Contributor

I would like to work on this issue

@timhoffm
Copy link
Member

AFAICS there is no clear action:

  • we don't want to start advertizing a special ax.spines['outline'] for colorbars if that will change to standard behavior in Enh better colorbar axes #18900.
  • ax.spines[:] works on any axis. It's documented on Spines and it doesn't make sense to add documentation on a general feature specifically to colorbars.

@story645 do you see any specific documentation that we should add that would have helped you? Otherwise I propose to close this.

@anushkrishnav Sorry that the action status is not clear/up-to-date.

@story645
Copy link
Member Author

story645 commented Apr 20, 2021

Haven't closed it because I think it could be useful as a backport only doc (since ax.spines doesn't work on earlier versions) but I don't know quite how far back it'd be backported

@jklymak
Copy link
Member

jklymak commented Apr 20, 2021

I don't think we rebuild old docs...

@timhoffm
Copy link
Member

ax.spines[:] is new in 3.4. https://matplotlib.org/stable/api/spines_api.html?highlight=spines#matplotlib.spines.Spines

We don't update docs for previous releases. So I'm closing this as nothing to do.

@story645 Maybe you want to twitter about this some day? This is not as glorious as subplot_mosaic, but a nice API to share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants