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

Function label_axes

galleries/examples/axes_grid1/simple_axes_divider1.py:14–19  ·  view source on GitHub ↗

Place a label at the center of an Axes, and remove the axis ticks.

(ax, text)

Source from the content-addressed store, hash-verified

12
13
14def label_axes(ax, text):
15 """Place a label at the center of an Axes, and remove the axis ticks."""
16 ax.text(.5, .5, text, transform=ax.transAxes,
17 horizontalalignment="center", verticalalignment="center")
18 ax.tick_params(bottom=False, labelbottom=False,
19 left=False, labelleft=False)
20
21
22# %%

Callers 1

Calls 2

textMethod · 0.45
tick_paramsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…