# HG changeset patch # User mheinzl # Date 1559561497 14400 # Node ID 28fb192858ea21300e2c2f7a472cfc2aa5e1002b # Parent 67e34fc2b67a685faa1fcbec5f37b228a61788d7 planemo upload for repository https://github.com/monikaheinzl/duplexanalysis_galaxy/tree/master/tools/fsd commit b8a2f7b7615b2bcd3b602027af31f4e677da94f6-dirty diff -r 67e34fc2b67a -r 28fb192858ea fsd.py --- a/fsd.py Mon Jun 03 07:26:01 2019 -0400 +++ b/fsd.py Mon Jun 03 07:31:37 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, density=True, color=colors) + 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.6, 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, color=colors) + counts = ax.hist(list_to_plot2, bins=numpy.arange(minimumX, maximumX + 2), stacked=False, edgecolor="black", linewidth=1, label=label, align="left", alpha=0.6, 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)) @@ -336,37 +336,16 @@ else: x = [xi + barWidth for xi in x] w = 1./(len(list_to_plot) + 1) - - - #print(label[i]) - #print(colors[i]) - #print(w) - # - - #print(numpy.sum(y)) - #print(float(numpy.sum(y))) - #print(x) - #print(new_y.shape) - #new_y = numpy.array(new_y).reshape((len(new_y))) - #print(new_y.shape) - #print(new_y) - - - - #new_y_heights = [x[0] for x in new_y] - #print(new_y_heights) - #print(new_y.shape) if to_plot[l] == "Relative frequencies": - print("relative") 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],linewidth=1, alpha=0.8, color=colors[i]) + edgecolor="black", label=label[i],linewidth=1, alpha=0.6, color=colors[i]) else: y = list(y.reshape((len(y)))) counts2 = ax.bar(x, y, align="edge", width=w, edgecolor="black", label=label[i], linewidth=1, - alpha=0.8, color=colors[i]) + alpha=0.6, color=colors[i]) if i == len(list_to_plot2): barWidth += 1. / (len(list_to_plot) + 1) + 1. / (len(list_to_plot) + 1) else: