0% found this document useful (0 votes)
24 views

4Python Heat Maps

Uploaded by

David Osei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

4Python Heat Maps

Uploaded by

David Osei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

PYTHON ­ HEAT MAPS

https://www.tutorialspoint.com/python/python_heat_maps.htm Copyright © tutorialspoint.com

Advertisements

A heatmap contains values representing various shades of the same colour for each value to be plotted. Usually
the darker shades of the chart represent higher values than the lighter shade. For a very different value a
completely different colour can also be used.

The below example is a two­dimensional plot of values which are mapped to the indices and columns of the chart.

from pandas import DataFrame


import matplotlib.pyplot as plt

data=[{2,3,4,1},{6,3,5,2},{6,3,5,4},{3,7,5,4},{2,8,1,5}]
Index= ['I1', 'I2','I3','I4','I5']
Cols = ['C1', 'C2', 'C3','C4']
df = DataFrame(data, index=Index, columns=Cols)

plt.pcolor(df)
plt.show()

Its output is as follows −

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy