def plotAgainstGFP(self, extradataA = [], extradataG = [], intensity = [], seq = []):
fig1 = pylab.figure(figsize = (25, 10))
print len(self.GFP)
for i in xrange(min(len(data.cat), 3)):
print len(self.GFP[self.categories == i])
vect = []
pylab.subplot(1,3,i+1)
#pylab.hist(self.GFP[self.categories == i], bins = 20, color = data.colors[i])
pop = self.GFP[self.categories == i]
pylab.plot(self.GFP[self.categories == i], self.angles[self.categories == i], data.colors[i]+'o', markersize = 8)#, label = data.cat[i])
print "cat", i, "n pop", len(self.GFP[(self.categories == i) & (self.GFP > -np.log(12.5))])
x = np.linspace(np.min(self.GFP[self.categories == i]), np.percentile(self.GFP[self.categories == i], 80),40)
#fig1.canvas.mpl_connect('pick_event', onpick)
for j in x:
vect.append(np.median(self.angles[(self.GFP > j) & (self.categories == i)]))
pylab.plot([-4.5, -0.5], [vect[0], vect[0]], data.colors[i], label = "mediane de la population entiere", linewidth = 5)
print vect[0], vect[np.argmax(x > -np.log(12.5))]
pylab.plot([-np.log(12.5), -0.5], [vect[np.argmax(x > -np.log(12.5))] for k in [0,1]], data.colors[i], label = "mediane de la population de droite", linewidth = 5, ls = '--')
pylab.axvline(x = -np.log(12.5), color = 'm', ls = '--', linewidth = 3)
pylab.xlim([-4.5, -0.5])
pylab.legend(loc = 2, prop = {'size':17})
pylab.title(data.cat[i].split(',')[0], fontsize = 24)
pylab.xlabel('score GFP', fontsize = 20)
pylab.ylabel('Angle (degre)', fontsize = 20)
pylab.tick_params(axis='both', which='major', labelsize=20)
pylab.ylim([-5, 105])
##pylab.xscale('log')
pylab.show()
评论列表
文章目录