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

Skip to content

More concise how to for subplot adjustment #20562

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
Jul 4, 2021

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Jul 1, 2021

Manual adjusting the subplot parameters should be the exception
nowadays. We don't need to discuss this in the FAQ. Users should
primarily use tight_layout or constrained_layout, which is covered
in the following section.

  • Repurpose the example "Auto Subplots Adjust" to "Programmatically
    controlling subplot adjustment". The effect of the example has been
    largely superseeded by tight layout and constrained layout. It's still
    useful as an example of using advanced concepts in Matplotlib such as
    Bboxes, transforms, events.
  • Remove "How-to: Move the edge of an axes to make room for tick labels"
    and move it's content to "Programmatically controlling subplot
    adjustment"
  • Remove "How-to: Automatically make room for tick labels"
    This is basically a documentation of subplots_adjust(). It's
    sufficient to link there.
  • Write a single new section "How to: "Make room for tick labels"
    that only links to manual adjustment / tight layout / constrained
    layout / "Programmatically controlling subplot adjustment"

@timhoffm timhoffm added this to the v3.5.0 milestone Jul 1, 2021
@jklymak
Copy link
Member

jklymak commented Jul 2, 2021

I of course like the automated way of doing things, but subplots_adjust probably still has a place in a lot of situations? I wonder if trimming it and maybe moving after the automated methods is preferable to wholesale removal?

@timhoffm timhoffm changed the title Remove "How-to: Move the edge of an axes to make room for tick labels" More concise how to for subplot adjustment Jul 2, 2021
@timhoffm
Copy link
Member Author

timhoffm commented Jul 2, 2021

I've taken the larger step of rewriting multiple sources that adjust subplot layouting.

Generally, FAQ entries should be short and link to further resources if possible. We don't want to duplicate content in the FAQ.

Comment on lines 15 to 16
(:doc:`/tutorials/intermediate/tight_layout_guide`
or :doc:`/tutorials/intermediate/constrainedlayout_guide`).
Copy link
Member

Choose a reason for hiding this comment

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

I think we might as well start swapping these...

Suggested change
(:doc:`/tutorials/intermediate/tight_layout_guide`
or :doc:`/tutorials/intermediate/constrainedlayout_guide`).
(:doc:`/tutorials/intermediate/constrainedlayout_guide`
or :doc:`/tutorials/intermediate/tight_layout_guide`).

Copy link
Member Author

Choose a reason for hiding this comment

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

sure.

- Repurpose the example "Auto Subplots Adjust" to "Programmatically
  controlling subplot adjustment". The effect of the example has been
  largely superseeded by tight layout and constrained layout. It's still
  useful as an example of using advanced concepts in Matplotlib such as
  Bboxes, transforms, events.
- Remove "How-to: Move the edge of an axes to make room for tick labels"
  and move it's content to "Programmatically controlling subplot
  adjustment"
- Remove "How-to: Automatically make room for tick labels"
  This is basically a documentation of `subplots_adjust()`. It's
  sufficient to link there.
- Write a single new section "How to: "Make room for tick labels"
  that only links to manual adjustment / tight layout / constrained
  layout / "Programmatically controlling subplot adjustment"
@jklymak jklymak merged commit c61077a into matplotlib:master Jul 4, 2021
@timhoffm timhoffm deleted the doc-faq branch July 4, 2021 17:58
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.

2 participants