Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6bafe2f

Browse files
committed
DOC: Edits of example
1 parent cf0938c commit 6bafe2f

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

examples/subplots_axes_and_figures/gridspec_nested.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
GridSpecs can be nested, so that a subplot from a parent GridSpec can
77
set the position for a nested grid of subplots.
88
9+
Note that the same functionality can be achieved more directly with
10+
`~.figure.PanelBase.subpanels`:
11+
:doc:`nested gridspecs</gallery/subplots_axes_and_figures/subpanels>`,
12+
913
"""
1014
import matplotlib.pyplot as plt
1115
import matplotlib.gridspec as gridspec

examples/subplots_axes_and_figures/subpanels.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
"""
22
================
3-
Nested Subpanels
3+
Figure Subpanels
44
================
5-
Sometimes it is desirable to have a figure that has two different
6-
layouts in it. This can be achieved with
7-
:doc:`nested gridspecs</gallery/subplots_axes_and_figures/gridspec_nested>`
5+
Sometimes it is desirable to have a figure with two different layouts in it.
6+
This can be achieved with
7+
:doc:`nested gridspecs</gallery/subplots_axes_and_figures/gridspec_nested>`,
88
but having a virtual figure with its own artists is helpful, so
9-
Matplotlib also has "subpanels", usually implimented by calling
10-
``.figure.PanelBase.add_subpanel`` in a way that is analagous to
11-
``.figure.PanelBase.add_subplot``.
9+
Matplotlib also has "subpanels", accessed by calling
10+
`.figure.PanelBase.add_subpanel` in a way that is analagous to
11+
`.figure.PanelBase.add_subplot`, or `.figure.PanelBase.subpanels` to make
12+
an array of subpanels. Note that subpanels can also have their own child
13+
subpanels.
1214
"""
1315
import matplotlib.pyplot as plt
1416
import numpy as np

0 commit comments

Comments
 (0)