Skip to content
Snippets Groups Projects
Commit a2a1fcd0 authored by hugo chauvet's avatar hugo chauvet
Browse files

improve visualisation of data for fixed time experiments

parent 913c1e00
Branches
No related tags found
No related merge requests found
......@@ -1225,15 +1225,17 @@ class BactosViewver():
Fonction pour tracer les profils de fluo
"""
ax1, ax2, ax3, ax4, ax5, ax6 = self.figure.get_axes()
for ax in (ax3, ax4, ax5, ax6):
ax.clear()
# Est qu'on est en temps ou en positions
if max(self.times) == 0:
istime=False
else:
istime = True
# Get axis from figure object
ax1, ax2, ax3, ax4, ax5, ax6 = self.figure.get_axes()
for ax in (ax3, ax4, ax5, ax6):
ax.clear()
# Check si on a au moins une bacterie de selectionnée
if sum(self.selected_bactos):
if istime:
......@@ -1242,7 +1244,9 @@ class BactosViewver():
ax3.set_xlabel('Temps')
else:
[ax3.plot(0, self.i1[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
#[ax3.plot(0, self.i1[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
ax3.scatter([0]*len(self.i1[0, self.selected_bactos]), self.i1[0, self.selected_bactos],
c=self.bactos_colors[self.selected_bactos])
ax3.plot(self.i1[0, self.selected_bactos].mean(), 'ko', ms=12)
ax3.set_xlabel('mean in black')
......@@ -1253,12 +1257,22 @@ class BactosViewver():
ax4.plot(self.i2[:, self.selected_bactos].mean(1), 'k--', lw=2)
ax4.set_xlabel('Temps')
else:
[ax4.plot(0, self.i2[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
#[ax4.plot(0, self.i2[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
ax4.scatter([0]*len(self.i2[0, self.selected_bactos]), self.i2[0, self.selected_bactos],
c=self.bactos_colors[self.selected_bactos])
ax4.plot(self.i2[0, self.selected_bactos].mean(), 'ko', lw=2, ms=12)
ax4.set_xlabel('mean in black')
ax4.set_ylabel('F1 fluo (TRP)')
#Min-max for static as min(min(F1),min(F2)) and max(max(F1), max(F2))
if not istime:
minF1F2 = np.min((self.i1[0, self.selected_bactos].min(), self.i2[0, self.selected_bactos].min())) - 20
maxF1F2 = np.max((self.i1[0, self.selected_bactos].max(), self.i2[0, self.selected_bactos].max())) + 20
ax3.set_ylim(minF1F2, maxF1F2)
ax4.set_ylim(minF1F2, maxF1F2)
# Plot du ratio du controle
ratio_ctrl = compute_control_ratio(self.selected_file, self.ListCtrl.value)
# print("control ratio shape:")
......@@ -1269,7 +1283,7 @@ class BactosViewver():
ax5.plot(ratio_ctrl.mean(1), 'k--', lw=2)
ax5.set_xlabel('Temps')
else:
ax5.plot([0]*ratio_ctrl.shape[1], ratio_ctrl[0], 'o')
ax5.plot([0]*ratio_ctrl.shape[1], ratio_ctrl[0], 'o', alpha=0.1, mec='None')
ax5.plot(0, ratio_ctrl.mean(), 'ko', ms=12)
ax5.set_xlabel('mean in black')
......@@ -1289,7 +1303,9 @@ class BactosViewver():
[ax6.plot(Idrug[:, i], color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
ax6.set_xlabel('Temps')
else:
[ax6.plot(0, Idrug[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
#[ax6.plot(0, Idrug[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
ax6.scatter([0]*len(Idrug[0, self.selected_bactos]), Idrug[0, self.selected_bactos],
c=self.bactos_colors[self.selected_bactos])
ax6.set_xlabel('')
ax6.set_ylabel('F2-mean(F2ctrl/F1ctrl)*F1')
......@@ -1315,9 +1331,11 @@ class BactosViewver():
ax6.plot(ratio[:, self.selected_bactos].mean(1), 'k--', lw=2)
ax6.set_xlabel('Temps')
else:
[ax6.plot(0, ratio[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
#[ax6.plot(0, ratio[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
ax6.scatter([0]*len(ratio[0, self.selected_bactos]), ratio[0, self.selected_bactos],
c=self.bactos_colors[self.selected_bactos])
ax6.plot(ratio[0, self.selected_bactos].mean(), 'ko', ms=12)
ax6.set_xlabel('mean is black')
ax6.set_xlabel('mean in black')
ax6.set_ylabel('F2/F1')
ax6.set_title('for position POS%i'%self.selected_pos)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment