comparison fsd.py @ 26:60f66f701816 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 05:53:24 -0400
parents 6d6de5991fa2
children b2b1f44966cb
comparison
equal deleted inserted replaced
25:6d6de5991fa2 26:60f66f701816
336 else: 336 else:
337 x = [xi + barWidth for xi in x] 337 x = [xi + barWidth for xi in x]
338 w = 1./(len(list_to_plot) + 1) 338 w = 1./(len(list_to_plot) + 1)
339 339
340 340
341 print(label[i]) 341 #print(label[i])
342 print(colors[i]) 342 #print(colors[i])
343 print(w) 343 #print(w)
344 # linewidth=1, 344 # linewidth=1,
345
346 print(sum(y))
347 new_y = [yi / float(sum(y)) for yi in y]
348 print(new_y)
345 349
346 if to_plot[l] == "Relative frequencies": 350 if to_plot[l] == "Relative frequencies":
347 counts2_rel = ax.bar(x, y.astype(float) / sum(y), align="edge", width=w, 351 counts2_rel = ax.bar(x, new_y, align="edge", width=w,
348 edgecolor="black", label=label[i], alpha=0.8, color=colors[i]) 352 edgecolor="black", label=label[i], alpha=0.8, color=colors[i])
349 353
350 else: 354 else:
351 counts2 = ax.bar(x, y, align="edge", width=w, edgecolor="black", label=label[i], 355 counts2 = ax.bar(x, y, align="edge", width=w, edgecolor="black", label=label[i],
352 alpha=0.8, color=colors[i]) 356 alpha=0.8, color=colors[i])