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

Function box

lib/matplotlib/pyplot.py:2181–2199  ·  view source on GitHub ↗

Turn the Axes box on or off on the current Axes. Parameters ---------- on : bool or None The new `~matplotlib.axes.Axes` box state. If ``None``, toggle the state. See Also -------- :meth:`matplotlib.axes.Axes.set_frame_on` :meth:`matplotlib.axes.Axe

(on: bool | None = None)

Source from the content-addressed store, hash-verified

2179
2180
2181def box(on: bool | None = None) -> None:
2182 """
2183 Turn the Axes box on or off on the current Axes.
2184
2185 Parameters
2186 ----------
2187 on : bool or None
2188 The new `~matplotlib.axes.Axes` box state. If ``None``, toggle
2189 the state.
2190
2191 See Also
2192 --------
2193 :meth:`matplotlib.axes.Axes.set_frame_on`
2194 :meth:`matplotlib.axes.Axes.get_frame_on`
2195 """
2196 ax = gca()
2197 if on is None:
2198 on = not ax.get_frame_on()
2199 ax.set_frame_on(on)
2200
2201## Axis ##
2202

Callers

nothing calls this directly

Calls 3

gcaFunction · 0.85
get_frame_onMethod · 0.45
set_frame_onMethod · 0.45

Tested by

no test coverage detected