Skip to content
Snippets Groups Projects
Commit fd1ef972 authored by Carlo Guidi's avatar Carlo Guidi
Browse files

Update acoustics.py

parent d26ce919
No related branches found
No related tags found
No related merge requests found
......@@ -171,8 +171,9 @@ while check:
fig = plt.figure()
ax = fig.add_subplot(111)
dom = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ,11, 12, 13, 14, 15, 16, 17, 18]
l = len(dom)
N_doms = 18
doms = range(N_DOMS + 1)
l = len(doms)
du1AB1 = 0.9*np.ones(l)
du1AB2 = 1*np.ones(l)
du1AB3 = 1.1*np.ones(l)
......@@ -208,21 +209,21 @@ while check:
CustomCmap = matplotlib.colors.ListedColormap(colorsList)
bounds=[-2, -1, 0, 1, 2]
norma = colors.BoundaryNorm(bounds, CustomCmap.N)
color = ax.scatter(du1AB1, dom, s = 20, c = DU1[iAB1], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du1AB2, dom, s = 20, c = DU1[iAB2], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du1AB3, dom, s = 20, c = DU1[iAB3], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du2AB1, dom, s = 20, c = DU2[iAB1], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du2AB2, dom, s = 20, c = DU2[iAB2], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du2AB3, dom, s = 20, c = DU2[iAB3], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du3AB1, dom, s = 20, c = DU3[iAB1], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du3AB2, dom, s = 20, c = DU3[iAB2], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du3AB3, dom, s = 20, c = DU3[iAB3], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du4AB1, dom, s = 20, c = DU4[iAB1], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du4AB2, dom, s = 20, c = DU4[iAB2], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du4AB3, dom, s = 20, c = DU4[iAB3], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du5AB1, dom, s = 20, c = DU5[iAB1], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du5AB2, dom, s = 20, c = DU5[iAB2], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du5AB3, dom, s = 20, c = DU5[iAB3], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du1AB1, doms, s = 20, c = DU1[iAB1], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du1AB2, doms, s = 20, c = DU1[iAB2], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du1AB3, doms, s = 20, c = DU1[iAB3], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du2AB1, doms, s = 20, c = DU2[iAB1], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du2AB2, doms, s = 20, c = DU2[iAB2], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du2AB3, doms, s = 20, c = DU2[iAB3], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du3AB1, doms, s = 20, c = DU3[iAB1], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du3AB2, doms, s = 20, c = DU3[iAB2], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du3AB3, doms, s = 20, c = DU3[iAB3], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du4AB1, doms, s = 20, c = DU4[iAB1], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du4AB2, doms, s = 20, c = DU4[iAB2], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du4AB3, doms, s = 20, c = DU4[iAB3], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du5AB1, doms, s = 20, c = DU5[iAB1], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du5AB2, doms, s = 20, c = DU5[iAB2], norm=norma, marker = 's', cmap = CustomCmap);
color = ax.scatter(du5AB3, doms, s = 20, c = DU5[iAB3], norm=norma, marker = 's', cmap = CustomCmap);
cbar = plt.colorbar(color)
......@@ -259,24 +260,3 @@ while check:
time.sleep(abs(TIT - check_time))
check=True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment