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

Function sca

lib/matplotlib/pyplot.py:1464–1473  ·  view source on GitHub ↗

Set the current Axes to *ax* and the current Figure to the parent of *ax*.

(ax: Axes)

Source from the content-addressed store, hash-verified

1462
1463
1464def sca(ax: Axes) -> None:
1465 """
1466 Set the current Axes to *ax* and the current Figure to the parent of *ax*.
1467 """
1468 # Mypy sees ax.figure as potentially None,
1469 # but if you are calling this, it won't be None
1470 # Additionally the slight difference between `Figure` and `FigureBase` mypy catches
1471 fig = ax.get_figure(root=False)
1472 figure(fig)
1473 fig.sca(ax) # type: ignore[union-attr]
1474
1475
1476def cla() -> None:

Callers

nothing calls this directly

Calls 3

figureFunction · 0.85
scaMethod · 0.80
get_figureMethod · 0.45

Tested by

no test coverage detected