Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ENH: add pad kwarg to set_title #9816

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
dopplershift merged 1 commit into matplotlib:master from jklymak:add-title-pad
Nov 20, 2017

Conversation

Copy link
Member

@jklymak jklymak commented Nov 19, 2017
edited
Loading

PR Summary

This adds a pad kwarg to axes.set_title().

I was writing some docs on set_title() and was surprised the only way to change the pad was via rcParams. This sets the default to be rcParams, but accepts a float to specify the number of points.

fig, axs = plt.subplots()
tt = axs.set_title('Boo', pad=30.)

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 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)
  • [N/A] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@jklymak jklymak changed the title (削除) ENH: add pad kwarg to set_title (削除ここまで) (追記) WIP: ENH: add pad kwarg to set_title (追記ここまで) Nov 19, 2017
Copy link
Member

Can you add a whats_new for this?

jklymak reacted with thumbs up emoji

# check that title padding puts the title in the right
# place...
fig, ax = plt.subplots()
ax.set_title('aardvark', pad=30.)
Copy link
Member

@tacaswell tacaswell Nov 20, 2017

Choose a reason for hiding this comment

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

👍 for use of 'aardvark'!

Copy link
Member Author

Choose a reason for hiding this comment

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

Wish I could claim credit, but I just cut and pasted from elsewhere. I hope its a good inside joke...

Copy link
Contributor

@afvincent afvincent Nov 20, 2017

Choose a reason for hiding this comment

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

Well at least it is likely to be the first word in English-dictionaries, isn't it ^^? It may actually be(come) a running gag in Matploltib code too: I used it as well in some tests with strings, copy-pasting it from some other existing code section as @jklymak did... (I did not even understand it was a proper word at that time 🐑 )

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

modulo a whats_new entry.

@jklymak jklymak changed the title (削除) WIP: ENH: add pad kwarg to set_title (削除ここまで) (追記) ENH: add pad kwarg to set_title (追記ここまで) Nov 20, 2017
@jklymak jklymak added this to the v2.2 milestone Nov 20, 2017
@dopplershift dopplershift merged commit 4389baf into matplotlib:master Nov 20, 2017
@jklymak jklymak deleted the add-title-pad branch November 20, 2017 22:15
@jklymak jklymak restored the add-title-pad branch November 22, 2017 04:53
@jklymak jklymak deleted the add-title-pad branch November 22, 2017 05:00
@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@afvincent afvincent afvincent left review comments

@tacaswell tacaswell tacaswell approved these changes

@dopplershift dopplershift dopplershift approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v2.2.0
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /