Skip to content

Interactive

Interactive heatmaps

You can combine dayplot with plotjs to make them interactive:

import matplotlib.pyplot as plt
import dayplot as dp
from plotjs import PlotJS

df = dp.load_dataset()

fig, ax = plt.subplots(figsize=(15, 6))
dp.calendar(
    dates=df["dates"],
    values=df["values"],
    start_date="2024-01-01",
    end_date="2024-12-31",
    ax=ax,
)
PlotJS(fig).add_tooltip(labels=df["values"]).save("docs/img/interactive.html")