Skip to content
Snippets Groups Projects
Commit 8435e959 authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Update bar plot.

parent ecec9076
Branches
No related merge requests found
intervene_test/Histone_barplot.png

15.2 KiB

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()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment