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 de96c0e commit 77235dbCopy full SHA for 77235db
1 file changed
examples/layer_images.py
@@ -0,0 +1,30 @@
1
+#!/usr/bin/env python
2
+"""
3
+See pcolor_demo2 for a much faster way of generating pcolor plots
4
5
+from __future__ import division
6
+from matplotlib.matlab import *
7
+
8
+def func3(x,y):
9
+ return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2)
10
11
12
+# make these smaller to increase the resolution
13
+dx, dy = 0.05, 0.05
14
15
+x = arange(-3.0, 3.0, dx)
16
+y = arange(-3.0, 3.0, dy)
17
+X,Y = meshgrid(x, y)
18
19
+Z1 = rand(10,6)
20
+im1 = imshow(Z1, cmap = Grayscale(256))
21
+im1.set_interpolation('nearest')
22
+hold(True)
23
24
+Z2 = func3(X, Y)
25
+im2 = imshow(Z2, cmap=ColormapJet(256), alpha=0.75)
26
+im2.set_interpolation('nearest')
27
28
+show()
29
30
0 commit comments