ax = fig.add_subplot(111) if opts.title: ax.set_title(r'{\Huge %s}' % (opts.title)) ax.set_xlabel(r'{\huge Seed-Type}') ax.set_ylabel(r'{\huge FDR$_{C_{a}}$}') ax.set_xticklabels([x.replace('_','\_') for x in header]) vectors = [] for x in header: if bag[x]: vectors.append(bag[x]) else: vectors.append(0) violin_plot(ax,vectors,range(len(header)), bp=opts.box_plot) setTickSizes(ax,19) if opts.out_file: pl.savefig(opts.out_file) if not opts.no_show: pl.show() print "Done"
yAxis1 = 'miRNAs' #yAxis2 = 'Proportion of Total' fig = pl.figure() ax1 = fig.add_subplot(111) pl.ylim(0,40) #ax2 = ax1.twinx() ax1.set_title(title) ax1.set_xlabel(xAxis,fontsize='xx-large') ax1.set_ylabel(yAxis1,fontsize='xx-large') #ax2.set_ylabel(yAxis2) n,b,p = ax1.hist(data,bins=20, range=None, normed=0, weights=None, cumulative=1, bottom=None, histtype='stepfilled', align='mid', orientation='vertical', rwidth=None, log=False,alpha=1) #eightyPcnt = round(n[-1]*0.8) #pl.axhspan(eightyPcnt, eightyPcnt, xmin=0, xmax=1, color='red') #ax2.hist(data, bins=50, range=None, normed=1, #weights=None, cumulative=1, bottom=None, #histtype='stepfilled', align='mid', orientation='vertical', #rwidth=None, log=False, alpha=0.5, facecolor='blue') pl.xlim(0,max(data)) setTickSizes(ax1,18) pl.savefig(saveAs) pl.show()