MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / add_subfigure

Method add_subfigure

lib/matplotlib/figure.py:1680–1708  ·  view source on GitHub ↗

Add a `.SubFigure` to the figure as part of a subplot arrangement. Parameters ---------- subplotspec : `.gridspec.SubplotSpec` Defines the region in a parent gridspec where the subfigure will be placed. Returns -------

(self, subplotspec, **kwargs)

Source from the content-addressed store, hash-verified

1678 return sfarr
1679
1680 def add_subfigure(self, subplotspec, **kwargs):
1681 """
1682 Add a `.SubFigure` to the figure as part of a subplot arrangement.
1683
1684 Parameters
1685 ----------
1686 subplotspec : `.gridspec.SubplotSpec`
1687 Defines the region in a parent gridspec where the subfigure will
1688 be placed.
1689
1690 Returns
1691 -------
1692 `.SubFigure`
1693
1694 Other Parameters
1695 ----------------
1696 **kwargs
1697 Are passed to the `.SubFigure` object.
1698
1699 See Also
1700 --------
1701 .Figure.subfigures
1702 """
1703 sf = SubFigure(self, subplotspec, **kwargs)
1704 self.subfigs += [sf]
1705 sf._remove_method = self.subfigs.remove
1706 sf.stale_callback = _stale_figure_callback
1707 self.stale = True
1708 return sf
1709
1710 def sca(self, a):
1711 """Set the current Axes to be *a* and return *a*."""

Callers 8

subfiguresMethod · 0.95
test_wrapFunction · 0.80
test_savefig_transparentFunction · 0.80
test_figure_clearFunction · 0.80
test_subfigure_ssFunction · 0.80
test_subfigure_spanningFunction · 0.80
subfigures.pyFile · 0.80

Calls 1

SubFigureClass · 0.85

Tested by 6

test_wrapFunction · 0.64
test_savefig_transparentFunction · 0.64
test_figure_clearFunction · 0.64
test_subfigure_ssFunction · 0.64
test_subfigure_spanningFunction · 0.64