diff --git a/intervene_test/Histone_barplot.png b/intervene_test/Histone_barplot.png new file mode 100644 index 0000000000000000000000000000000000000000..ffa8c3b8197f84a436ab8ea90754703c5aeee269 Binary files /dev/null and b/intervene_test/Histone_barplot.png differ diff --git a/intervene_test/update_barplot.py b/intervene_test/update_barplot.py new file mode 100644 index 0000000000000000000000000000000000000000..a649ea9b9e67a1f27e20cf91465ae57eee4931f3 --- /dev/null +++ b/intervene_test/update_barplot.py @@ -0,0 +1,38 @@ +import matplotlib.pyplot as plt +import numpy as np +import pandas as pd + +N = 7 +men_means = (20, 35, 30, 35, 27) + +pts = np.array([ + 179, 49, 189, 55720, 907, 12592, 153356]) + +df = pd.DataFrame([ + 179, 49, 189, 55720, 907, 12592, 153356]) + +ind = np.arange(N) # the x locations for the groups +width = 0.35 # the width of the bars + + +f, axis = plt.subplots(2, 1, sharex=True) +df.plot(kind='bar', ax=axis[0]) +df.plot(kind='bar', ax=axis[1]) +axis[0].set_ylim(5000, 200000) +axis[1].set_ylim(0, 1500) +axis[1].legend().set_visible(False) + +axis[0].spines['bottom'].set_visible(False) +axis[1].spines['top'].set_visible(False) +axis[0].xaxis.tick_top() +axis[0].tick_params(labeltop='off') +axis[1].xaxis.tick_bottom() +d = .02 +kwargs = dict(transform=axis[0].transAxes, color='#1E8EC9', clip_on=False) +axis[0].plot((-d,+d),(-d,+d), **kwargs) +axis[0].plot((1-d,1+d),(-d,+d), **kwargs) +kwargs.update(transform=axis[1].transAxes) +axis[1].plot((-d,+d),(1-d,1+d), **kwargs) +axis[1].plot((1-d,1+d),(1-d,1+d), **kwargs) +plt.savefig('Histone_barplot.png') +plt.clf()