Thanks to visit codestin.com Credit goes to github.com
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 1230e83 commit c631e7fCopy full SHA for c631e7f
1 file changed
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