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.
2 parents 4fd00b0 + c53ddbb commit 78c6865Copy full SHA for 78c6865
examples/pylab_examples/invert_axes.py
@@ -1,21 +1,20 @@
1
-#!/usr/bin/env python
2
"""
3
-
4
You can use decreasing axes by flipping the normal order of the axis
5
limits
6
7
8
-from pylab import *
9
10
-t = arange(0.01, 5.0, 0.01)
11
-s = exp(-t)
12
-plot(t, s)
+import matplotlib.pyplot as plt
+import numpy as np
+
+t = np.arange(0.01, 5.0, 0.01)
+s = np.exp(-t)
+plt.plot(t, s)
13
14
-xlim(5, 0) # decreasing time
+plt.xlim(5, 0) # decreasing time
15
16
-xlabel('decreasing time (s)')
17
-ylabel('voltage (mV)')
18
-title('Should be growing...')
19
-grid(True)
+plt.xlabel('decreasing time (s)')
+plt.ylabel('voltage (mV)')
+plt.title('Should be growing...')
+plt.grid(True)
20
21
-show()
+plt.show()
0 commit comments