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

Skip to content

Add Figure methods get_suptitle(), get_subxlabel(), get_supylabel()#25686

Merged
oscargus merged 1 commit intomatplotlib:mainfrom
timhoffm:get_suptitle
Apr 17, 2023
Merged

Add Figure methods get_suptitle(), get_subxlabel(), get_supylabel()#25686
oscargus merged 1 commit intomatplotlib:mainfrom
timhoffm:get_suptitle

Conversation

@timhoffm
Copy link
Copy Markdown
Member

PR Summary

We had no public API to optain these values. The API is modelled analogous to Axes.get_title() / Axes.get_x/ylabel(), i.e. returning a string (and not the Text object) and returning an empty string if no text has been set yet.

Side remark. It's historic and unfortunate that the setters don't have the set_ prefix (in contrast to e.g. set_title()). Nevertheless get_* is the only sane choice for the getters introduced here.

Comment thread lib/matplotlib/figure.py
@timhoffm timhoffm added this to the v3.8.0 milestone Apr 14, 2023
@oscargus oscargus merged commit 2d0c3ba into matplotlib:main Apr 17, 2023
@timhoffm timhoffm deleted the get_suptitle branch April 17, 2023 20:16
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