MCPcopy
hub / github.com/matplotlib/matplotlib / test_simple

Function test_simple

lib/matplotlib/tests/test_pickle.py:23–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21
22
23def test_simple():
24 fig = plt.figure()
25 pickle.dump(fig, BytesIO(), pickle.HIGHEST_PROTOCOL)
26
27 ax = plt.subplot(121)
28 pickle.dump(ax, BytesIO(), pickle.HIGHEST_PROTOCOL)
29
30 ax = plt.axes(projection='polar')
31 plt.plot(np.arange(10), label='foobar')
32 plt.legend()
33
34 pickle.dump(ax, BytesIO(), pickle.HIGHEST_PROTOCOL)
35
36# ax = plt.subplot(121, projection='hammer')
37# pickle.dump(ax, BytesIO(), pickle.HIGHEST_PROTOCOL)
38
39 plt.figure()
40 plt.bar(x=np.arange(10), height=np.arange(10))
41 pickle.dump(plt.gca(), BytesIO(), pickle.HIGHEST_PROTOCOL)
42
43 fig = plt.figure()
44 ax = plt.axes()
45 plt.plot(np.arange(10))
46 ax.set_yscale('log')
47 pickle.dump(fig, BytesIO(), pickle.HIGHEST_PROTOCOL)
48
49
50def _generate_complete_test_figure(fig_ref):

Callers

nothing calls this directly

Calls 7

figureMethod · 0.80
gcaMethod · 0.80
axesMethod · 0.45
plotMethod · 0.45
legendMethod · 0.45
barMethod · 0.45
set_yscaleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…