Repository navigation
Open
Labels
DocumentationkeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Action
Description
We should have an overview (possibly in the tutorials) which methods create Axes and when to use which.
This could contain the flow-chart blow plus additional descriptions.
- I've not taken into account
subgridspecandaxes_grid1. - Am I missing some methods?
- the diagram could be embedded using
.. graphviz. However, while it renders with http://graphviz.it/ it currently does not with sphinx (issueing some errors). - The styling could still be improved (add links, font/color, use a HTML node instead of a record, ...)
digraph {
node[shape=diamond]
q_fullsize; q_simple_grid; q_complex_grid; q_inset; q_twin;
node[shape=record]
full_size;
q_fullsize [label="full size?"]
full_size [label="{plt.subplot()|plt.subplots()} | {Figure.add_subplot()|Figure.subplots()}"]
q_simple_grid [label="simple grid?"]
simple_grid [label="{plt.subplot(n, m, k) | plt.subplots(n, m)}| {Figure.add_subplot(n, m, k) | Figure.subplots(n, m)}"]
q_complex_grid [label="complex grid?"]
complex_grid [label="{plt.subplot2grid() | plt.subplot(subplotspec) | plt.subplots(gridspec_kw) | } | { | Figure.subplot(subplotspec) | Figure.subplots(gridspec_kw) | GridSpec.subplots()}"]
q_inset [label="inset?"]
inset [label="Axes.inset_axes()"]
q_twin [label="twin?"]
twin [label="{plt.twinx() | plt.twiny()} | {Axes.twinx() | Axes.twiny()}"]
axes [label="{plt.axes() | Figure.add_axes()}"]
q_fullsize -> q_simple_grid [ label = "No" ];
q_simple_grid -> q_complex_grid [label = "No" ];
q_fullsize -> full_size [ label = "Yes" ];
q_simple_grid -> simple_grid[ label = "Yes" ];
q_complex_grid -> complex_grid [label = "Yes"];
q_complex_grid -> q_inset [label = "No"];
q_inset -> inset[label="Yes"];
q_inset -> q_twin [label="No"]
q_twin -> twin[label="Yes"]
q_twin -> axes[label="No"]
{
rank=same;
q_fullsize full_size
}
{
rank=same;
q_simple_grid simple_grid
}
{
rank=same;
q_complex_grid complex_grid
}
{
rank=same;
q_inset inset
}
{
rank=same;
q_twin twin
}
}
Reacted by Ian Hunt-Isaak, YonghuiWang99, Arunav Konwar, Ruth Comer and Caitlin Dancer
Metadata
Metadata
Assignees
Labels
DocumentationkeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Action

Activity
ianhi commentedon May 10, 2020
This would be great! I've always been a bit overwhelmed by this.
👍
I think you're missing
Figure.gca()which will create an axis if one doesn't exist. https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.figure.Figure.html#matplotlib.figure.Figure.gcaSuggestions:
YonghuiWang99 commentedon May 10, 2020
I am just learning matplotlib through the tutorials. The overview helps me to understand more about the creative logic. Understanding improve skill of application, I believe. So thank you.
In addition, do you think if it is possible to add general concepts which I could find in version 3.1.0 in the current released version (version 3.2.1) ? I think it is also important to understand the creative logic as well.
https://matplotlib.org/3.1.0/tutorials/introductory/usage.html
timhoffm commentedon Aug 29, 2021
subplot_mosaicQuLogic commentedon Aug 30, 2021
You can insert Graphviz diagrams into Sphinx; maybe you just want to copy what you have in directly somewhere?
timhoffm commentedon Aug 30, 2021
That's the plan. When trying that last year, it did not compile; see the original post. Should be tried again, but I don't have the time to work on this currently. Anybody is welcome to turn this in to a proper PR. But maybe it's better to wait until the new documentation structure is merged to see where in the docs this should go.
DOC: Add overview of axes creation methods
DOC: Add overview of axes creation methods
DOC: Add overview of axes creation methods
DOC: Add overview of axes creation methods
github-actions commentedon Aug 2, 2023
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
QuLogic commentedon Aug 2, 2023
The PR has been opened; ergo this issue can stay open.