-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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:Add link to style examples in matplotlib.style documentation #14790
DOC:Add link to style examples in matplotlib.style documentation #14790
Conversation
@timhoffm Can you help me understand why the tests are failing on circleci? |
If you check the CircleCI output, you'll find
If you then check
That would be the right one to use (see also https://matplotlib.org/devel/documenting_mpl.html?highlight=writing%20documentation#referring-to-other-documents-and-sections). However, in this context I would reference the whole document by using
The difference is
As an exercise, you can |
The documentation for matplotlib.style isn't very helpful for those wanting to use a style sheet, so added reference to stylesheet references. closes #14362
@timhoffm Thank you so much for all the info. It feels so great to contribute to an organization which help you improve 😄 . Would love to continue contributing here! |
Rendered docs: https://23056-1385122-gh.circle-artifacts.com/0/home/circleci/project/doc/build/html/api/style_api.html Now that I'm looking at it, would it make sense to put this above the API description? This is a bit lost at the bottom of the page. I'm afraid nobody will see it. |
@timhoffm I agree. It would be better if I place it above the api description with a one-liner info.
|
under "Built documentation is available at..." |
and to answer question 1) Yes, they are copied around as part of the doc building process. The source lives at https://github.com/matplotlib/matplotlib/blob/master/examples/style_sheets/style_sheets_reference.py |
Repositioned the seealso directive from bottom to top
@timhoffm Made the change. Looks much better now |
doc/api/style_api.rst
Outdated
@@ -2,6 +2,10 @@ | |||
``matplotlib.style`` | |||
******************** | |||
|
|||
.. seealso:: | |||
|
|||
Examples on using style sheets with :func:`matplotlib.style.use` can be found at :doc:`/gallery/style_sheets/style_sheets_reference`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Examples of..."
Is there some reason this needs a "seealso"?
Is there any reason to not be even a bit more verbose here? I don't find the style sheet reference example particularly helpful either. I'd suggest pointing to the style sheet section of the examples rather than the master reference. And if you really want to make it nice, I'd include a bit more detail. i.e.
Matplotlib has the ability to make style sheets that control the default values of variables in the matplotlibrc (see plt.rcParam) that control how plot elements look. Style sheets allow different parts of a script to have different styles using the `styles.use('mystyle')` call. Users can also define their own custom styles and store them in their `.matplotlib` directory.
Or something like that. I'm a little surprised we don't already have anything like that.
If you don't feel like tackling that here, thats fine, this is an improvement as-is (except for the typo), and we could open a new issue about being more verbose here..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand. I think I could fix this typo and work on giving more detail in a separate PR.
Thanks @sameshl ! |
@jklymak Looking forward to make more contributions here! 😃 |
The documentation for matplotlib.style isn't very helpful for those wanting to use a style sheet, so added reference to stylesheet references.
PS: I messed up the commit history of my previous PR on the same issue, so made a new PR.
closes #14362
PR Summary
PR Checklist