In [1]:
%pylab inline
from biokit.viz import Imshow
In [2]:
data = numpy.random.randn(10,10)
In [3]:
imshow(data) # this is the default behaviour in matplotlib
Out[3]:
In [4]:
im = Imshow(data)
im.plot(cmap='jet')
In [5]:
import pandas as pd
df = pd.DataFrame({'A':[1,2], 'B':[3,4]}, index=['X','Y'])
df
Out[5]:
In [6]:
# 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)
In [ ]: