Python-Fiddle Logopython-fiddle.com
AI Data Analyst Sign In
AI Data Analyst Chrome Extension Sign In

Matplotlib Heatmap

Use the Matplotlib library to create a heatmap

Python
import numpy as np
import matplotlib.pyplot as plt

# Data
data = np.random.rand(10, 6)

# Create heatmap
plt.imshow(data, cmap='hot', interpolation='nearest')
plt.colorbar()
plt.title('Heatmap')
plt.show()
Click Run or press shift + ENTER to run code

Related

  • Web Maps with Folium
  • Drawing Arrows with Matplotlib
  • Add and customize axis labels using Matplotlib in Python
  • Creating and Customizing Bar Plots in Matplotlib
  • Understanding and Using Matplotlib Colormaps in Data Science
  • Matplotlib Named Colors with Examples
  • How to create a custom legend with Matplotlib
  • Fill the Area Between Curves in Matplotlib
  • Customizing Font Size in Matplotlib
  • Creating and Customizing Heatmaps in Matplotlib
  • Creating and Customizing Horizontal Lines in Matplotlib
  • Customizing Line Styles in Matplotlib
  • Mastering Quiver Plots in Matplotlib
  • Mastering Scatter Plots in Matplotlib
  • Creating and Customizing Tables in Matplotlib
  • Add Text to the Plot in Matplotlib
  • Dual Y-Axis Plots in Matplotlib
  • Matplotlib vs Plotly: Which Python Library Should You Use?
  • Network Analysis with NetworkX
  • Adding New Columns to DataFrames - Pandas vs. Polars
  • Creating and Customizing Histograms in Plotly
  • Creating and Customizing Scatter Plots in Plotly
  • Creating Histograms with Seaborn in Python - Comprehensive Tutorial

Footer

Examples

  • Pandas
  • Polars
  • Matplotlib
  • Seaborn
  • Plotly
  • GeoPandas
  • Treelib
  • Altair
  • Bokeh
  • Panel App
  • Bokeh App
  • NetworkX
  • Folium
  • Faker
  • Pillow
  • Biopython
  • Scikit-Learn
  • Scipy
  • Numpy
  • Statsmodels
  • Xarray
  • OpenCV
  • Scikit-Image
  • XGBoost
  • LightGBM
  • DuckDB
  • SQLite3
  • SymPy
  • Pygal
  • igraph
  • python-docx
  • python-pptx
  • xlsxwriter
  • openpyxl
  • pyyaml

Online Coding Challenges

  • Newbie To Python
  • Beginner Python
  • Intermediate Python
  • Advanced Python

Tools

  • Chrome Extension
  • AI Graph Generator
  • AI Statistics Solver
  • AI Math Solver
  • Blogging With Jupyter Notebooks
  • DB Fiddle - Online SQL Playground
  • AI Python Tutor
  • Regex Playground
  • Python Visualizer
  • DuckDB Playground
  • JWT Debugger
  • Cron Job Parser
  • Markdown Editor
  • Pyp5js playground
  • URL Decoder
  • URL Encoder
  • UUID Generator
  • Base64 Image Encoder/Decoder
  • Base64 String Encoder/Decoder
  • Number Base Converter

About

    Contact
  • Terms and Conditions
  • Privacy Policy

© 2025 python-fiddle.com. All rights reserved.