8000 Changed tight_layout doc strings by fredrik-1 · Pull Request #11061 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Changed tight_layout doc strings #11061

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
merged 1 commit into from
Apr 17, 2018

Conversation

fredrik-1
Copy link
Contributor

I didn't understand what pad_inches in the h_pad, w_pad default was so I copied part of the doc string from auto_adjust_subplotpars in tight_layout where the default was correctly explained.

Defaults to `pad_inches`.

Padding between the figure edge and the edges of subplots,
as a fraction of the font size.
Copy link
Member

Choose a reason for hiding this comment

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

which fontsize? Otherwise, looks good....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the actual code

font_size_inches = (
        FontProperties(size=rcParams["font.size"]).get_size_in_points() / 72)

But that part has been in the doc string the "whole" time. The part I changed is both difficult to understand and actually wrong.

@dstansby
Copy link
Member
< 8000 /table>

Copy link
Member
@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

Looks good otherwise. There would still be room for improvement (the font size description), but this could go in as "better than before".

There's a couple of PEP8 errors; I think you need to get rid of trailing spaces at the end of the lines added. Otherwise looks good!

https://travis-ci.org/matplotlib/matplotlib/jobs/367305794#L2427


Padding between the figure edge and the edges of subplots,
as a fraction of the font size.
h_pad, w_pad : float
Copy link
Member

Choose a reason for hiding this comment

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

Should stay "optional". Instead, please add "optional" to the pyplot docstring.

@timhoffm
Copy link
Member
timhoffm commented Apr 16, 2018

Can you please rebase on the current master. It contains fixes for the CircleCI builds, which were broken by the release of pip 10.

If you need a desciption for rebaseing see here.

@dstansby dstansby added this to the v2.2-doc milestone Apr 17, 2018
@dstansby dstansby merged commit db3be23 into matplotlib:master Apr 17, 2018
@dstansby
Copy link
Member

Thanks a lot @fredrik-1 !

@QuLogic QuLogic modified the milestones: v2.2-doc, v3.0 Apr 17, 2018
@fredrik-1 fredrik-1 deleted the doc_tight_layout branch May 11, 2018 09:25
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.

5 participants
0