Skip to content

Instantly share code, notes, and snippets.

@gpratt
Created March 14, 2014 17:28
Show Gist options
  • Save gpratt/9552605 to your computer and use it in GitHub Desktop.
Save gpratt/9552605 to your computer and use it in GitHub Desktop.
rect = [0.7, 0.11, 0.25, 0.25]
with Figure(os.path.join(img_dir, "fdr_cutoffs.svg"), figsize=(10,10)) as fig:
ax = fig.add_subplot(1,1,1)
subax = fig.add_axes(rect)
for experiment in sorted(set(combined_dfs.index.get_level_values(0)), key=order):
ax.plot(x_axis,
y_axes[experiment],
label=experiment,
linewidth=3, alpha=.5,
color=color_dict[experiment])
subax.plot(x_axis[x_axis < .1],
y_axes[experiment][x_axis < .1],
label=experiment,
linewidth=3, alpha=.5,
color=color_dict[experiment])
ax.set_xlabel("FDR")
ax.set_ylabel("Number of Significant Genes")
ax.set_title("FLAG Tag based FDR Threshold for RIP-seq Data")
ax.legend(fontsize=18, loc=2)
ax.plot([.05, .05], [0,max([max(y_axis) for y_axis in y_axes.values()])], linewidth=1, alpha=.5, linestyle=":")
subax.plot([.05, .05], [0,4500], linewidth=1, alpha=.5, linestyle=":")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment