This notebook is part of biokit
imshow with pandas dataframe : imshow
%pylab inline
from biokit.viz import Imshow
Populating the interactive namespace from numpy and matplotlib
data = numpy.random.randn(10,10)
imshow(data) # this is the default behaviour in matplotlib
<matplotlib.image.AxesImage at 0x7f294c52dd90>
im = Imshow(data)
im.plot(cmap='jet')
import pandas as pd
df = pd.DataFrame({'A':[1,2], 'B':[3,4]}, index=['X','Y'])
df
A | B | |
---|---|---|
X | 1 | 3 |
Y | 2 | 4 |
# by default xticks are rotated by 90 degrees since names could be long
# but in this example names are short, so we reset the rotation.
Imshow(df).plot(rotation_x=0)