def plot_filtered(filt, first, aver, incmap, figno=666, err=1, smerr=1): plt.figure(figno) plt.clf() plt.axes([0.1, 0.3, 0.8, 0.65]) plt.hold(1) ax = plt.gca() plot_iq(ax, first.T, smerr=smerr, label="First rep") plot_iq(ax, aver.T, smerr=smerr, label="All reps") plot_iq(ax, filt.T, smerr=smerr, label="Filtered") plt.legend() plt.axis('tight') plt.axes([0.1, 0.05, 0.8, 0.15]) plt.imshow(incmap, interpolation='nearest', aspect='auto') plt.plot(np.sum(incmap, axis=0)-0.5, 'y') plt.axis('tight') av = plt.axis() plt.axis([av[0], av[1], av[3], av[2]]) plt.hold(0) plt.show()
def plot_outliers(filtered, first, aver, inclist, cdm, threshold): plt.clf() plt.subplot(221) sm = 1 ax = plt.gca() plot_iq(ax, first.T, smerr=sm, label="First rep") plot_iq(ax, aver.T, smerr=sm, label="All reps") plot_iq(ax, filtered.T, smerr=sm, label="Filtered, %d reps" % len(inclist)) plt.legend() plt.subplot(222) plot_distmat(cdm) plt.subplot(223) N = filtered.shape[-1] plot_clusterhist(cdm, inclist, N, threshold) plt.subplot(224) plot_distmat_marginal(cdm, threshold, sublist=inclist) plt.show()
def plot_clustering(filtered, first, aver, inclist, cdm, links, threshold): plt.clf() plt.subplot(221) sm = 1 ax = plt.gca() plot_iq(ax, first.T, smerr=sm, label="First rep", color='blue') plot_iq(ax, aver.T, smerr=sm, label="All reps", color='red') plot_iq(ax, filtered.T, smerr=sm, label="Largest cluster, %d reps" % len(inclist), color='lawngreen') plt.legend() plt.subplot(222) plot_distmat(cdm) # plot_distmat_marginal(cdm) plt.subplot(223) N = filtered.shape[-1] plot_clusterhist(cdm, inclist, N, threshold) plt.subplot(224) plot_dendrogram(links, threshold) plt.show()