Skip to content

DOC: move usage tutorial info to Users guide rst #21335

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 7 commits into from
Oct 14, 2021

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Oct 11, 2021

PR Summary

tutorials/usage.py had some useful information buried that was not really a "tutorial", was almost all written in rst, and in my opinion deserve their own TOC in the users/ section. The organization is flat for now, but will be re-organized (I hope) when #21251 goes in.

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@@ -0,0 +1,151 @@
.. _performance:
Copy link
Member Author

Choose a reason for hiding this comment

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

Just as a point of reference, all I have done is move these verbatim versus tried to edit them.

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.

👍 For moving this stuff out of the Usage Guide tutorial.

Are backends.rst and performance.rst 1:1 copies or did you edit things?

Comment on lines 27 to 32
Choosing a backend
------------------

Matplotlib needs a "backend" to render your figure, either in its own GUI window,
as part of a notebook, or saved as an image to disk. If you need more information on
choosing a backend, see :ref:`backends`.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should bother people with backends before they have even plotted their first figure.

Automatic backend detection works mostly fine so that you don't have to care to get started.

Copy link
Member Author

Choose a reason for hiding this comment

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

Given the number of questions we get "why doesn't my plot show?" I'm not inclined to agree, and thought a quick mention here would get people looking at the right page.

Copy link
Member

@timhoffm timhoffm Oct 13, 2021

Choose a reason for hiding this comment

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

Let's be more targeted then: Instead of a general comment on backends, add the following below the plot code:

If no plot shows up, please check [Toubleshooting].

which may link to https://matplotlib.org/devdocs/faq/troubleshooting_faq.html and should get a section on "my plot does not show".

That's probably worth a second PR, because a really helpful guide to "it doesn't work" needs some care.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well lets point it there, and open an issue that says it needs work.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've changed to

Further details are available in the :doc:`Installation Guide </users/installing>`.  If a 
plot does not show up, we probably could not automatically find an appropriate backend; please 
check :ref:`troubleshooting-faq`.  

I would still suggest that the jargon "backend" appear somewhere on this page because it is key to googling solutions to many problems. However most new users have no idea this very important word even exists.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not convinced that we probably could not automatically find an appropriate backend; is really the most probable cause or that the term "backend" will stick or be helpful here. - I think that should only be discussed inside troubleshooting, i.e. when the user is having problems.

However, I can accept that sentence if we move it to the "First plot" paragraph. It's sematically in the context of plotting not installation.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I already moved this with the latest push.

We can keep this ambiguous:

If a plot does not show up please check :ref:`troubleshooting-faq`.  

and get more specific in the trouble shooting faq (or a page linked therein).

@jklymak
Copy link
Member Author

jklymak commented Oct 12, 2021

It's verbatim!

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.

This is good to go, apart from the unrelated renderer changes.

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.

@jklymak should this be squashed before merging?

@timhoffm timhoffm added this to the v3.5.0 milestone Oct 14, 2021
@timhoffm timhoffm merged commit aa122c0 into matplotlib:master Oct 14, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 14, 2021
QuLogic pushed a commit to timhoffm/matplotlib that referenced this pull request Oct 15, 2021
QuLogic added a commit that referenced this pull request Oct 15, 2021
@lumberbot-app lumberbot-app bot mentioned this pull request Oct 15, 2021
QuLogic pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 15, 2021
QuLogic added a commit that referenced this pull request Oct 15, 2021
…335-on-v3.5.x

Backport PR #21335 on branch v3.5.x (DOC: move usage tutorial info to Users guide rst)
tacaswell pushed a commit that referenced this pull request Oct 20, 2021
DOC: move usage tutorial info to Users guide rst
tacaswell pushed a commit that referenced this pull request Oct 20, 2021
tacaswell pushed a commit that referenced this pull request Oct 20, 2021
ccaprani pushed a commit to ccaprani/matplotlib that referenced this pull request Jan 23, 2023
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