Parameters ---------- parent : `.Figure` or `.SubFigure` Figure or subfigure that contains the SubFigure. SubFigures can be nested. subplotspec : `.gridspec.SubplotSpec` Defines the region in a parent gridspec where the subfigure
(self, parent, subplotspec, *,
facecolor=None,
edgecolor=None,
linewidth=0.0,
frameon=None,
**kwargs)
| 2240 | """ |
| 2241 | |
| 2242 | def __init__(self, parent, subplotspec, *, |
| 2243 | facecolor=None, |
| 2244 | edgecolor=None, |
| 2245 | linewidth=0.0, |
| 2246 | frameon=None, |
| 2247 | **kwargs): |
| 2248 | """ |
| 2249 | Parameters |
| 2250 | ---------- |
| 2251 | parent : `.Figure` or `.SubFigure` |
| 2252 | Figure or subfigure that contains the SubFigure. SubFigures |
| 2253 | can be nested. |
| 2254 | |
| 2255 | subplotspec : `.gridspec.SubplotSpec` |
| 2256 | Defines the region in a parent gridspec where the subfigure will |
| 2257 | be placed. |
| 2258 | |
| 2259 | facecolor : default: ``"none"`` |
| 2260 | The figure patch face color; transparent by default. |
| 2261 | |
| 2262 | edgecolor : default: :rc:`figure.edgecolor` |
| 2263 | The figure patch edge color. |
| 2264 | |
| 2265 | linewidth : float |
| 2266 | The linewidth of the frame (i.e. the edge linewidth of the figure |
| 2267 | patch). |
| 2268 | |
| 2269 | frameon : bool, default: :rc:`figure.frameon` |
| 2270 | If ``False``, suppress drawing the figure background patch. |
| 2271 | |
| 2272 | Other Parameters |
| 2273 | ---------------- |
| 2274 | **kwargs : `.SubFigure` properties, optional |
| 2275 | |
| 2276 | %(SubFigure:kwdoc)s |
| 2277 | """ |
| 2278 | super().__init__(**kwargs) |
| 2279 | if facecolor is None: |
| 2280 | facecolor = "none" |
| 2281 | edgecolor = mpl._val_or_rc(edgecolor, 'figure.edgecolor') |
| 2282 | frameon = mpl._val_or_rc(frameon, 'figure.frameon') |
| 2283 | |
| 2284 | self._subplotspec = subplotspec |
| 2285 | self._parent = parent |
| 2286 | self._root_figure = parent._root_figure |
| 2287 | |
| 2288 | # subfigures use the parent axstack |
| 2289 | self._axstack = parent._axstack |
| 2290 | self.subplotpars = parent.subplotpars |
| 2291 | self.dpi_scale_trans = parent.dpi_scale_trans |
| 2292 | self._axobservers = parent._axobservers |
| 2293 | self.transFigure = parent.transFigure |
| 2294 | self.bbox_relative = Bbox.null() |
| 2295 | self._redo_transform_rel_fig() |
| 2296 | self.figbbox = self._parent.figbbox |
| 2297 | self.bbox = TransformedBbox(self.bbox_relative, |
| 2298 | self._parent.transSubfigure) |
| 2299 | self.transSubfigure = BboxTransformTo(self.bbox) |
nothing calls this directly
no test coverage detected