Skip to content
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

DOC: Minor improvements on quickstart #28134

Merged
merged 3 commits into from
Apr 25, 2024
Merged

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Apr 24, 2024

See the commit messages.

Commits are best be looked at individually.

That
```
import matplotlib as mpl
mpl.[submodule].[class]
```
works is an implementation detail because the top-level
namespace has imported these submodules. There's no
guarantee this will continue to work.

Also move the imports of the two relevant classes close
to their usage. This minimizes our top-level import to
the canonical `import matplotlib.pyplot as plt`.
- Add `plt.show()` to first example and explain that it may be
  omitted sometimes rather than not having it in the code and
  stating that it has to be added sometimes.
  Reason: a missing show may result in no figure popup and is
  hard to debug. An extraneous show has no effect.
- Figure creation functions:
  - de-emphasize pyplot. Stating the functions is enough here.
    We don't need to say where they come from explicitly. In
    particular we haven't explained the interface distinction yet.
    So let's be quite about that.
  - Do not mention/link backends here. That concept is far too
    advanced and not need here.
 - Some more wording changes.
@github-actions github-actions bot added the Documentation: user guide files in galleries/users_explain or doc/users label Apr 24, 2024
galleries/users_explain/quick_start.py Outdated Show resolved Hide resolved
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
@timhoffm timhoffm added this to the v3.9.0 milestone Apr 25, 2024
@timhoffm timhoffm merged commit 6d661f0 into matplotlib:main Apr 25, 2024
41 of 43 checks passed
@timhoffm timhoffm deleted the doc-quickstart branch April 25, 2024 05:52
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Apr 25, 2024
timhoffm added a commit that referenced this pull request Apr 25, 2024
…134-on-v3.9.x

Backport PR #28134 on branch v3.9.x (DOC: Minor improvements on quickstart)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: user guide files in galleries/users_explain or doc/users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants