draw csv file data as a heatmap using numpy and matplotlib

Posted by Schrodinger's Cat on Stack Overflow See other posts from Stack Overflow or by Schrodinger's Cat
Published on 2010-04-25T17:02:40Z Indexed on 2010/04/27 7:43 UTC
Read the original article Hit count: 308

Filed under:
|
|

Hello all, I was able to load my csv file into a numpy array: data = np.genfromtxt('csv_file', dtype=None, delimiter=',') Now I would like to generate a heatmap. I have 19 categories from 11 samples, along these lines:

cat,1,2,3...
a,0.0,0.2,0.3
b,1.0,0.4,0.2
.
.
.

I wanted to use matplotlib colormesh. but I'm at loss. all the examples I could find used random number arrays. any help and insights would be greatly appreciated.

many thanks

© Stack Overflow or respective owner

Related posts about matplotlib

Related posts about numpy