8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f67368 commit 96154e9Copy full SHA for 96154e9
examples/subplots_axes_and_figures/invert_axes.py
@@ -12,13 +12,14 @@
12
13
t = np.arange(0.01, 5.0, 0.01)
14
s = np.exp(-t)
15
-plt.plot(t, s)
16
17
-plt.xlim(5, 0) # decreasing time
+fig, ax = plt.subplots()
18
19
-plt.xlabel('decreasing time (s)')
20
-plt.ylabel('voltage (mV)')
21
-plt.title('Should be growing...')
22
-plt.grid(True)
+ax.plot(t, s)
+ax.set_xlim(5, 0) # decreasing time
+ax.set_xlabel('decreasing time (s)')
+ax.set_ylabel('voltage (mV)')
+ax.set_title('Should be growing...')
23
+ax.grid(True)
24
25
plt.show()
0 commit comments