Data For Science

Data For Science

Visualization

Matplotlib Heatmap

Bruno Gonçalves's avatar
Bruno Gonçalves
Aug 07, 2021
∙ Paid

Welcome to the latest post of the Viz4Sci Substack! This week we play around with matploltib’s heatmap functionality and use it to visualize the peak times of the Top 50 countries by number of CoVID-19 cases.

Subscribe now

Share

And we’re looking forward to hearing your thoughts, so go ahead and….

Leave a comment

This week we once again use the JHU CoVID dataset has steadily become the unofficial standard dataset for the number of cases and deaths around the world. Yo can checkout out our previous post using this data repository in the time series state map post.

Today’s application is fairly straightforward. After some normalization and sorting, we simply use plt.imshow (we used it a couple weeks ago to display photos in the Color Blindness post) to display our matrix of values as a heatmap:

User's avatar

Continue reading this post for free, courtesy of Bruno Gonçalves.

Or purchase a paid subscription.
© 2026 Data For Science, Inc · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture