forked from Yamini-8750/github-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchess.py
More file actions
20 lines (20 loc) · 687 Bytes
/
Copy pathchess.py
File metadata and controls
20 lines (20 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#implementation of matplotlib function
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import LogNora
dx,dy = 0.015,0.05
x = np.arange(-4.0,4.0,dx)
y = np.arrange(-4.0,4.0,dy)
X,Y = np.meshgrid(x,y)
extent = np.min(x),np.max(x),np.min(y),np.max(y)
Z1 = np.add.outer(range(8),range(8)) %2
plt.imshow(21,cmap="binary_r",
interpolation="nearest",
extent = extent , alpha=1)
def copyassignment(x,y):
return (1 - x /2 + x**5+y**6) * np.exp(-(x ** 2+ y**2))
Z2 = copyassignment(X,Y)
plt.imshow(Z2 , alpha=0.7,interpolation="bilinear",extent = extent)
plt.cool()
plt.title("matplotlib.pyplot.cool() function Example",fontweight="bold")
plt.show()