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 9d7ee27 + 0d2332f commit b183c1aCopy full SHA for b183c1a
examples/pylab_examples/image_interp.py
@@ -1,4 +1,3 @@
1
-#!/usr/bin/env python
2
"""
3
The same (small) array, interpolated with three different
4
interpolation methods.
@@ -46,18 +45,20 @@
46
45
suggested.
47
48
49
-from pylab import *
50
-A = rand(5, 5)
51
-figure(1)
52
-imshow(A, interpolation='nearest')
53
-grid(True)
+import matplotlib.pyplot as plt
+import numpy as np
54
55
-figure(2)
56
-imshow(A, interpolation='bilinear')
57
+A = np.random.rand(5, 5)
+plt.figure(1)
+plt.imshow(A, interpolation='nearest')
+plt.grid(True)
58
59
-figure(3)
60
-imshow(A, interpolation='bicubic')
61
+plt.figure(2)
+plt.imshow(A, interpolation='bilinear')
62
63
-show()
+plt.figure(3)
+plt.imshow(A, interpolation='bicubic')
+
64
+plt.show()
0 commit comments