Last active
April 1, 2016 23:19
-
-
Save bkamapantula/a48ee00a3f0239d067bec360f19c1430 to your computer and use it in GitHub Desktop.
Heatmap of pandas dataframe in using matplotlib - notebook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
# %matplotlib inline | |
mpl.style.use('ggplot') | |
df = pd.read_csv("chr_19_H2BK12ac_result.txt", sep="\t") | |
plt.pcolor(df[['run_1', 'run_2', 'run_3', 'run_4', 'run_5']], cmap='RdBu', norm=mpl.colors.LogNorm()) | |
plt.colorbar() | |
plt.xlabel('Runs at different read lengths') | |
plt.ylabel('Chr 19 regions') | |
#labels = ['30', '30', '30', '36', '36'] | |
#ax.set_xticklabels(labels) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment