Mercurial > repos > mheinzl > fsd
changeset 36:54ba0ad1263f draft
planemo upload for repository https://github.com/monikaheinzl/duplexanalysis_galaxy/tree/master/tools/fsd commit b8a2f7b7615b2bcd3b602027af31f4e677da94f6-dirty
author | mheinzl |
---|---|
date | Mon, 03 Jun 2019 07:22:06 -0400 |
parents | 56ad50707dc8 |
children | 67e34fc2b67a |
files | fsd.py |
diffstat | 1 files changed, 7 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/fsd.py Mon Jun 03 07:08:37 2019 -0400 +++ b/fsd.py Mon Jun 03 07:22:06 2019 -0400 @@ -282,9 +282,9 @@ ticks1[len(ticks1) - 1] = ">20" if to_plot[l] == "Relative frequencies": - counts_rel = ax.hist(list_to_plot2, bins=numpy.arange(minimumX, maximumX + 2), stacked=False, edgecolor="black", linewidth=1, label=label, align="left", alpha=0.8, rwidth=0.8, normed=True) + counts_rel = ax.hist(list_to_plot2, bins=numpy.arange(minimumX, maximumX + 2), stacked=False, edgecolor="black", linewidth=1, label=label, align="left", alpha=0.8, rwidth=0.8, density=True, color=colors) else: - counts = ax.hist(list_to_plot2, bins=numpy.arange(minimumX, maximumX + 2), stacked=False, edgecolor="black", linewidth=1, label=label, align="left", alpha=0.8, rwidth=0.8) + counts = ax.hist(list_to_plot2, bins=numpy.arange(minimumX, maximumX + 2), stacked=False, edgecolor="black", linewidth=1, label=label, align="left", alpha=0.8, rwidth=0.8, color=colors) ax.legend(loc='upper right', fontsize=14, frameon=True, bbox_to_anchor=(0.9, 1)) ax.set_xticks(numpy.array(ticks)) @@ -341,7 +341,7 @@ #print(label[i]) #print(colors[i]) #print(w) - # linewidth=1, + # #print(numpy.sum(y)) #print(float(numpy.sum(y))) @@ -359,19 +359,15 @@ if to_plot[l] == "Relative frequencies": print("relative") - new_y = list(numpy.concatenate((numpy.array([yi / float(numpy.sum(y)) for yi in y])))) + #new_y = list(numpy.concatenate((numpy.array([yi / float(numpy.sum(y)) for yi in y])))) - counts2_rel = ax.bar(x, new_y, align="edge", width=w, - edgecolor="black", label=label[i], alpha=0.8, color=colors[i]) + counts2_rel = ax.bar(x, list(numpy.float_(y)) / numpy.sum(y), align="edge", width=w, + edgecolor="black", label=label[i],linewidth=1, alpha=0.8, color=colors[i]) else: - print("absolute") - print(y.shape) - #print(x.shape) - print(y) y = list(y.reshape((len(y)))) - counts2 = ax.bar(x, y, align="edge", width=w, edgecolor="black", label=label[i], + counts2 = ax.bar(x, y, align="edge", width=w, edgecolor="black", label=label[i], linewidth=1, alpha=0.8, color=colors[i]) if i == len(list_to_plot2): barWidth += 1. / (len(list_to_plot) + 1) + 1. / (len(list_to_plot) + 1)