make a heat map with python
4
0
Entering edit mode
9 months ago

Hey guys, I want to make a heatmap, normally I use prisma for this, but it is a paid service. Does anyone know any tool in python to make a heatmap?

Heatmap python • 1.1k views
ADD COMMENT
0
Entering edit mode

A Google search never hurts. Always try something before asking others for help.

https://www.google.com/search?q=python+heatmap+packages

ADD REPLY
1
Entering edit mode
9 months ago
Wayne ★ 2.1k

I'd add a plug for Seaborn.

It has HeatMap as one of it standard types of plots it does. To get a good sense of its abilities, see here for 'Plotting a diagonal correlation matrix' in the examples Gallery and 'Annotated Heatmaps' in the Gallery and 'Scatterplot heatmap' in the Gallery and 'Discovering structure in heatmap data ' in the Gallery](https://seaborn.pydata.org/examples/structured_heatmap.html), as well as the blog post 'How To Make Lower Triangle Heatmap with Correlation Matrix in Python?' I'll discuss more below. The main Seaborn documentation page for its heatmap is here.

It is Matplotlib based and so you can still access the underlying basics and customize ad infinitum and make publication quality versions easily. I feel Plotly, WHILE GREAT, changes a lot over time, doesn't make the inner workings as customizable because they change fairly regularly, and is focused on web presentation.

This post 'How To Make Lower Triangle Heatmap with Correlation Matrix in Python?' provides a good intro to making feature-rich, customized heatmap. I have adapted it for many of the examples you can see listed in 'Available Demonstration Notebooks' here in the static rendering of the repo of notebooks. If you want to actually run those notebooks, click the 'launch binder' badge here for a temporary session with everything necessary to run the notebooks 'as-is' all set *without needing you to do anything on your own system**. Or click here to launch the session. When the session comes up you can click on the notebooks listed under ''Available Demonstration Notebooks' to open and then run them.

ADD COMMENT
0
Entering edit mode
9 months ago
Joe 21k

plotly is (or was) an option. I believe there is a free tier.

ADD COMMENT
0
Entering edit mode
9 months ago
shelkmike ★ 1.4k

There are many ways to make heatmaps in Python. I prefer Plotly https://plotly.com/python/heatmaps/
You can google "make a heatmap in Python".

ADD COMMENT
0
Entering edit mode
9 months ago

Why not use ComplexHeatmap package in R? This tool is both user-friendly and powerful.

QuickStart https://www.geeksforgeeks.org/how-to-make-heatmaps-in-r-with-complexheatmap/

Advanced protocol https://jokergoo.github.io/ComplexHeatmap-reference/book/a-single-heatmap.html

ADD COMMENT
0
Entering edit mode

OP asked for python

ADD REPLY
0
Entering edit mode

While I'm also a huge fan of ComplexHeatmap, even using Python's CH analog (https://github.com/DingWB/PyComplexHeatmap/) probably won't nearly be as powerful as other well developed py heatmap utilities.

ADD REPLY

Login before adding your answer.

Traffic: 2446 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6