Skip to main content

calendar_heatmap_plot()

GitHub style calendar heatmap of daily commits, one row per year.

Usage

Source

calendar_heatmap_plot(
    commits,
    repo=None,
    date_begin=None,
    date_end=None,
    title=None,
    week_start="Sunday",
    low="#ebedf0",
    high="#216e39"
)

Parameters

commits: polars.DataFrame

Commits from collect_git_commits().

repo: str or list of str = None

Repo name(s) to keep. None uses all repos.

date_begin: str or datetime.date = None

Inclusive date bounds ("YYYY-MM-DD" strings work).

date_end: str or datetime.date = None

Inclusive date bounds ("YYYY-MM-DD" strings work).

title: str = None

Plot title. Defaults to the repo name(s) or "All repos".

week_start: str = "Sunday"

"Sunday" (GitHub’s layout) or "Monday" (ISO weeks).

low: str = "#ebedf0"

Colors for zero commits and the busiest day.

high: str = "#ebedf0"
Colors for zero commits and the busiest day.

Returns

matplotlib.figure.Figure