Skip to content

Commit c53ddbb

Browse files
committed
MEP12 on invert_axes.py
1 parent 4c4852d commit c53ddbb

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed
+12-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
#!/usr/bin/env python
21
"""
3-
42
You can use decreasing axes by flipping the normal order of the axis
53
limits
6-
74
"""
8-
from pylab import *
95

10-
t = arange(0.01, 5.0, 0.01)
11-
s = exp(-t)
12-
plot(t, s)
6+
import matplotlib.pyplot as plt
7+
import numpy as np
8+
9+
t = np.arange(0.01, 5.0, 0.01)
10+
s = np.exp(-t)
11+
plt.plot(t, s)
1312

14-
xlim(5, 0) # decreasing time
13+
plt.xlim(5, 0) # decreasing time
1514

16-
xlabel('decreasing time (s)')
17-
ylabel('voltage (mV)')
18-
title('Should be growing...')
19-
grid(True)
15+
plt.xlabel('decreasing time (s)')
16+
plt.ylabel('voltage (mV)')
17+
plt.title('Should be growing...')
18+
plt.grid(True)
2019

21-
show()
20+
plt.show()

0 commit comments

Comments
 (0)