.. deprecated:: 3.10 Currently this method will raise an exception if *fig* is anything other than the root `.Figure` this (Sub)Figure is on. In future it will always raise an exception.
(self, fig)
| 269 | return self._parent |
| 270 | |
| 271 | def set_figure(self, fig): |
| 272 | """ |
| 273 | .. deprecated:: 3.10 |
| 274 | Currently this method will raise an exception if *fig* is anything other |
| 275 | than the root `.Figure` this (Sub)Figure is on. In future it will always |
| 276 | raise an exception. |
| 277 | """ |
| 278 | no_switch = ("The parent and root figures of a (Sub)Figure are set at " |
| 279 | "instantiation and cannot be changed.") |
| 280 | if fig is self._root_figure: |
| 281 | _api.warn_deprecated( |
| 282 | "3.10", |
| 283 | message=(f"{no_switch} From Matplotlib 3.12 this operation will raise " |
| 284 | "an exception.")) |
| 285 | return |
| 286 | |
| 287 | raise ValueError(no_switch) |
| 288 | |
| 289 | figure = property(functools.partial(get_figure, root=True), set_figure, |
| 290 | doc=("The root `Figure`. To get the parent of a `SubFigure`, " |
no outgoing calls
no test coverage detected