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

Function plot_hatch

lib/matplotlib/tests/test_determinism.py:39–48  ·  view source on GitHub ↗
(fig)

Source from the content-addressed store, hash-verified

37 ax.plot(x, [5] * 10, marker='v')
38
39 def plot_hatch(fig):
40 # also use different hatch patterns
41 ax2 = fig.add_subplot()
42 bars = (ax2.bar(range(1, 5), range(1, 5)) +
43 ax2.bar(range(1, 5), [6] * 4, bottom=range(1, 5)))
44 ax2.set_xticks([1.5, 2.5, 3.5, 4.5])
45
46 patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.')
47 for bar, pattern in zip(bars, patterns):
48 bar.set_hatch(pattern)
49
50 def plot_image(fig):
51 axs = fig.subplots(1, 3, sharex=True, sharey=True)

Callers 1

_save_figureFunction · 0.85

Calls 4

add_subplotMethod · 0.80
set_xticksMethod · 0.80
barMethod · 0.45
set_hatchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…