User Tools

Site Tools


simple_faceting_matplotlib

This include the label rotation and shading through the parameter “rot=”.

import matplotlib
matplotlib.style.use('ggplot')
import matplotlib.pyplot as plt
import pandas as pd
 
df = pd.DataFrame({ 'celltype':["foo","bar","qux","woz"], 's1':[5,9,1,7], 's2':[12,90,13,87]})
df = df[["celltype","s1","s2"]]
df.set_index(["celltype"],inplace=True)
df.plot(kind='bar',alpha=0.75, rot=0)
plt.xlabel("")
plt.show()
simple_faceting_matplotlib.txt · Last modified: 2016/11/25 12:38 by vincenzo