MCPcopy
hub / github.com/matplotlib/matplotlib / identify_axes

Function identify_axes

galleries/users_explain/axes/mosaic.py:39–54  ·  view source on GitHub ↗

Helper to identify the Axes in the examples below. Draws the label in a large font in the center of the Axes. Parameters ---------- ax_dict : dict[str, Axes] Mapping between the title / label and the Axes. fontsize : int, optional How big the label should b

(ax_dict, fontsize=48)

Source from the content-addressed store, hash-verified

37
38# Helper function used for visualization in the following examples
39def identify_axes(ax_dict, fontsize=48):
40 """
41 Helper to identify the Axes in the examples below.
42
43 Draws the label in a large font in the center of the Axes.
44
45 Parameters
46 ----------
47 ax_dict : dict[str, Axes]
48 Mapping between the title / label and the Axes.
49 fontsize : int, optional
50 How big the label should be.
51 """
52 kw = dict(ha="center", va="center", fontsize=fontsize, color="darkgrey")
53 for k, ax in ax_dict.items():
54 ax.text(0.5, 0.5, k, transform=ax.transAxes, **kw)
55
56
57# %%

Callers 1

mosaic.pyFile · 0.85

Calls 1

textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…