-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
add subplots to axes documentation #11454
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
Conversation
37ff66d
to
3f0533f
Compare
|
||
.. contents:: Table of Contents | ||
:depth: 2 | ||
:local: | ||
:backlinks: entry | ||
:class: multicol-toc | ||
|
||
Subplots |
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.
This appears in the TOC as a level above "Plotting", so I think needs a lower decoration level:
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 tried to change the header hierarchy without checking the result... and I see now that didn't work and that I didn't know how headers works in rst. I tried to lower the subplot level and that level stayed the same but everything else toggled its level... Tries again.
edit: I thought I pushed a new version yesterday but something went wrong. It should be updated now.
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 don't think this is going the right way. This whole page was documenting the Axes
class. You've now changed it to the axes
module and inserted the subplots stuff in between the class description and the list of functions (the sections here are used to group the Axes
methods by topic).
It may be ok to document the complete axes
module here, but then one would have to change the structure. The TOC is currently "within the class" and only listing its functions.
It would have to go to the top and be restructured to something like:
- Axes
- Plotting
- ...
- Subplots
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.
But why should there be a special page for documenting the Axes class instead of the axes module?
But the page can of course be restructured in same way.
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.
The Axes
class is so large and fundamental, that it might have a dedicated page. But I'm not saying it has to be that way. I also laid out a possible structure if the file should contain the whole module.
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 am not sure what is the best. Your structure is of course a possibility (it was not in your post when I wrote my answer).
I am thinking that axes is one module, it consist of 2 public classes and a factory function. Most axes used in practice are also subplots. The suggest structure show the 2 classes and the factory function at the beginning in a way that don't take up to much place and I doubt that the order is confusing.
What about changing the name to subplot sub module
or something like that?
One problem is that the axes module is not included in the module list in neither version of the documents.
3f0533f
to
656e86e
Compare
656e86e
to
9c154ef
Compare
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’m approving as is. Having the subplots module where it is is a bit jarring, but at least its now appearing in the docs, which it wasn’t before. We can make further changes if we hate it (maybe move to the bottom)
Added the
_subplots
module to the axes documentation. Changedsubplot_class_factory
docstring to a docstring and put:nosignatures:
in thefigure_api.rst
file because I think it looks nicer.