Skip to content

Instantly share code, notes, and snippets.

View YuanfengZhang's full-sized avatar
🎯
Focusing

Zhang Yuanfeng YuanfengZhang

🎯
Focusing
View GitHub Profile
@YuanfengZhang
YuanfengZhang / seaborn_discrete_heatmap.py
Last active January 18, 2024 09:04
Draw a heatmap for discrete values in Python
# -*- coding: utf-8 -*-
"""
A quick guide for beginners to draw a heatmap for discrete values.
"""
from collections import OrderedDict
from typing import Tuple
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns