(**subplot_kws: Any)
| 504 | |
| 505 | |
| 506 | def _maybe_gca(**subplot_kws: Any) -> Axes: |
| 507 | import matplotlib.pyplot as plt |
| 508 | |
| 509 | # can call gcf unconditionally: either it exists or would be created by plt.axes |
| 510 | f = plt.gcf() |
| 511 | |
| 512 | # only call gca if an active axes exists |
| 513 | if f.axes: |
| 514 | # can not pass kwargs to active axes |
| 515 | return plt.gca() |
| 516 | |
| 517 | return plt.axes(**subplot_kws) |
| 518 | |
| 519 | |
| 520 | def _get_units_from_attrs(da: DataArray) -> str: |
searching dependent graphs…