adding all files done so far

This commit is contained in:
2019-07-10 20:18:31 +01:00
parent 13c0e9cb4d
commit e3ac390e8b
76 changed files with 8644 additions and 0 deletions

21
bayes-learning/test.py Normal file
View File

@@ -0,0 +1,21 @@
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.colors
x = np.linspace(-3, 3)
X, Y = np.meshgrid(x, x)
Z = np.exp(-(X**2 + Y**2))
fig, (ax, ax2) = plt.subplots(ncols=2)
colors = ["red", "orange", "gold", "limegreen", "k",
"#550011", "purple", "seagreen"]
ax.set_title("contour with color list")
contour = ax.contourf(X, Y, Z, colors=colors)
ax2.set_title("contour with colormap")
cmap = matplotlib.colors.ListedColormap(colors)
contour = ax2.contourf(X, Y, Z, cmap=cmap)
fig.colorbar(contour)
plt.show()