Skip to content

DOC: Remove pyplot vs. OO interface discussion from lifecycle example#31423

Merged
timhoffm merged 1 commit into
matplotlib:mainfrom
timhoffm:doc-lifecycle-interface
Apr 1, 2026
Merged

DOC: Remove pyplot vs. OO interface discussion from lifecycle example#31423
timhoffm merged 1 commit into
matplotlib:mainfrom
timhoffm:doc-lifecycle-interface

Conversation

@timhoffm
Copy link
Copy Markdown
Member

That discussion is out of scope here, and we generally use OO nowadays.

Likewise, we do not need to explain the terms figure/Axes.

That discussion is out of scope here, and we generally use OO nowadays.
<https://pbpython.com/effective-matplotlib.html>`_
by Chris Moffitt. It was transformed into this tutorial by Chris Holdgraf.

A note on the explicit vs. implicit interfaces
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we link to the quick start guide here as a way to guide users back to the rest of the docs?

https://matplotlib.org/stable/users/explain/quick_start.html

Copy link
Copy Markdown
Member Author

@timhoffm timhoffm Mar 29, 2026

Choose a reason for hiding this comment

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

What makes this example special that warrants referencing the quick start guide?

The pyplot vs. OO was just here because the blog post from which the example was created was a general
https://pbpython.com/effective-matplotlib.html. But in the context of our own docs, we don't need to reference everything back to quick start. Instead, we assume that a user has the basic understanding from quickstart already.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's written as a self-contained doc, so maintaining a bit of context via links seems useful. Crosslinking never hurts and we could do more of it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm of a different opinion here. Examples and tutorials in our docs can and should never be self-contained. You cannot jump into an arbitrary place of the docs and expect to understand it without prior knowledge.

Cross-linking hurts if the topic is not directly relevant to the content at hand because it dillutes focus and creates clutter.

Since we obviously have different opinions, I recuse myself from the topic, as such discusions typically lead nowhere. I leave it up to you guys to fix the lifecycle tutorial.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure fair enough, but I apologize if it seemed I was demanding this - it was just a suggestion, and you asked why I was making it, so I answered.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Examples and tutorials in our docs can and should never be self-contained.

I think that's a part of a larger discussion on modality and purpose. I also agree w/ @jklymak that a cross-reference is nice to have (here mostly to keep the spirit of the original) but I think removing this is a plus 'cause seperatly I think it's a bad idea to explain things twice cause that introduces the potential for drift.

@timhoffm timhoffm closed this Mar 30, 2026
@timhoffm timhoffm deleted the doc-lifecycle-interface branch March 30, 2026 00:02
@timhoffm timhoffm restored the doc-lifecycle-interface branch March 30, 2026 20:40
@timhoffm timhoffm reopened this Mar 30, 2026
@timhoffm
Copy link
Copy Markdown
Member Author

Reopening since this's been a communication misunderstanding.

@story645 @jklymak thanks for clarifying.

Copy link
Copy Markdown
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

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

Thanks for reopening and cleaning this up!

@timhoffm
Copy link
Copy Markdown
Member Author

timhoffm commented Apr 1, 2026

To move forward, I'm merging this with one approval per our docs policy.

@timhoffm timhoffm added this to the v3.11.0 milestone Apr 1, 2026
@timhoffm timhoffm merged commit c192740 into matplotlib:main Apr 1, 2026
35 checks passed
@timhoffm timhoffm deleted the doc-lifecycle-interface branch April 1, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: tutorials files in galleries/tutorials

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants