|
20 | 20 | __all__ = [ |
21 | 21 | 'subplots', |
22 | 22 | 'SubplotsContainer', |
| 23 | + 'show', |
23 | 24 | 'close', |
| 25 | + 'switch_backend', |
24 | 26 | 'ion', |
25 | 27 | 'ioff', |
26 | 28 | 'isinteractive', |
27 | | - 'show', |
28 | | - 'switch_backend', |
29 | 29 | ] |
30 | 30 |
|
31 | 31 | docstring.snippets['pyplot.statement'] = """ |
|
54 | 54 |
|
55 | 55 |
|
56 | 56 | @docstring.add_snippets |
57 | | -def close(*args, **kwargs): |
| 57 | +def show(*args, **kwargs): |
58 | 58 | """ |
59 | | - Call `matplotlib.pyplot.close`. |
| 59 | + Call `matplotlib.pyplot.show`. |
60 | 60 | %(pyplot.statement)s |
61 | 61 |
|
62 | 62 | Parameters |
63 | 63 | ---------- |
64 | 64 | *args, **kwargs |
65 | | - Passed to `matplotlib.pyplot.close`. |
| 65 | + Passed to `matplotlib.pyplot.show`. |
66 | 66 | """ |
67 | | - plt.close(*args, **kwargs) |
| 67 | + return plt.show(*args, **kwargs) |
68 | 68 |
|
69 | 69 |
|
70 | 70 | @docstring.add_snippets |
71 | | -def ion(): |
| 71 | +def close(*args, **kwargs): |
72 | 72 | """ |
73 | | - Call `matplotlib.pyplot.ion`. |
| 73 | + Call `matplotlib.pyplot.close`. |
74 | 74 | %(pyplot.statement)s |
| 75 | +
|
| 76 | + Parameters |
| 77 | + ---------- |
| 78 | + *args, **kwargs |
| 79 | + Passed to `matplotlib.pyplot.close`. |
75 | 80 | """ |
76 | | - plt.ion() |
| 81 | + return plt.close(*args, **kwargs) |
77 | 82 |
|
78 | 83 |
|
79 | 84 | @docstring.add_snippets |
80 | | -def ioff(): |
| 85 | +def switch_backend(*args, **kwargs): |
81 | 86 | """ |
82 | | - Call `matplotlib.pyplot.ioff`. |
| 87 | + Call `matplotlib.pyplot.switch_backend`. |
83 | 88 | %(pyplot.statement)s |
| 89 | +
|
| 90 | + Parameters |
| 91 | + ---------- |
| 92 | + *args, **kwargs |
| 93 | + Passed to `matplotlib.pyplot.switch_backend`. |
84 | 94 | """ |
85 | | - plt.ioff() |
| 95 | + return plt.switch_backend(*args, **kwargs) |
86 | 96 |
|
87 | 97 |
|
88 | 98 | @docstring.add_snippets |
89 | | -def isinteractive(): |
| 99 | +def ion(): |
90 | 100 | """ |
91 | | - Call `matplotlib.pyplot.isinteractive`. |
| 101 | + Call `matplotlib.pyplot.ion`. |
92 | 102 | %(pyplot.statement)s |
93 | 103 | """ |
94 | | - plt.isinteractive() |
| 104 | + return plt.ion() |
95 | 105 |
|
96 | 106 |
|
97 | 107 | @docstring.add_snippets |
98 | | -def show(*args, **kwargs): |
| 108 | +def ioff(): |
99 | 109 | """ |
100 | | - Call `matplotlib.pyplot.show`. |
| 110 | + Call `matplotlib.pyplot.ioff`. |
101 | 111 | %(pyplot.statement)s |
102 | | -
|
103 | | - Parameters |
104 | | - ---------- |
105 | | - *args, **kwargs |
106 | | - Passed to `matplotlib.pyplot.show`. |
107 | 112 | """ |
108 | | - plt.show(*args, **kwargs) |
| 113 | + return plt.ioff() |
109 | 114 |
|
110 | 115 |
|
111 | 116 | @docstring.add_snippets |
112 | | -def switch_backend(*args, **kwargs): |
| 117 | +def isinteractive(): |
113 | 118 | """ |
114 | | - Call `matplotlib.pyplot.switch_backend`. |
| 119 | + Call `matplotlib.pyplot.isinteractive`. |
115 | 120 | %(pyplot.statement)s |
116 | | -
|
117 | | - Parameters |
118 | | - ---------- |
119 | | - *args, **kwargs |
120 | | - Passed to `matplotlib.pyplot.switch_backend`. |
121 | 121 | """ |
122 | | - plt.switch_backend(*args, **kwargs) |
| 122 | + return plt.isinteractive() |
123 | 123 |
|
124 | 124 |
|
125 | 125 | def _journals(journal): |
|
0 commit comments