Return the `.SubplotParams` for the GridSpec. In order of precedence the values are taken from - non-*None* attributes of the GridSpec - the provided *figure* - :rc:`figure.subplot.*` Note that the ``figure`` attribute of the GridSpec is always ign
(self, figure=None)
| 405 | ax._set_position(ax.get_subplotspec().get_position(fig)) |
| 406 | |
| 407 | def get_subplot_params(self, figure=None): |
| 408 | """ |
| 409 | Return the `.SubplotParams` for the GridSpec. |
| 410 | |
| 411 | In order of precedence the values are taken from |
| 412 | |
| 413 | - non-*None* attributes of the GridSpec |
| 414 | - the provided *figure* |
| 415 | - :rc:`figure.subplot.*` |
| 416 | |
| 417 | Note that the ``figure`` attribute of the GridSpec is always ignored. |
| 418 | """ |
| 419 | if figure is None: |
| 420 | kw = {k: mpl.rcParams["figure.subplot."+k] |
| 421 | for k in self._AllowedKeys} |
| 422 | subplotpars = SubplotParams(**kw) |
| 423 | else: |
| 424 | subplotpars = copy.copy(figure.subplotpars) |
| 425 | |
| 426 | subplotpars.update(**{k: getattr(self, k) for k in self._AllowedKeys}) |
| 427 | |
| 428 | return subplotpars |
| 429 | |
| 430 | def locally_modified_subplot_params(self): |
| 431 | """ |
nothing calls this directly
no test coverage detected