Calendar heatmaps from Pandas time series data
Calplot creates heatmaps from Pandas time series data.
Plot Pandas time series data sampled by day in a heatmap per calendar year, similar to GitHub's contributions plot, using matplotlib.
Package calplot is a fork of calmap with the following changes and additions.
pandas>=0.18
is now required to install the package. Legacy code for compatibility removed. Fixed a FutureWarning inyearplot
.- Function
calendarplot
renamed tocalplot
. - Argument
colorbar
added for functioncalplot
to display a colorbar to the right of the heatmap if more than one unique values in plot. Defaults toTrue
. - Argument
dropzero
added for functioncalplot
andyearplot
to specify whether to not fill a cell with a color for days with a zero value. Defaults toTrue
. - Argument
figsize
added for functioncalplot
. Defaults to a tighter layout automatically adjusted to fit the number of years in plot. - Argument
suptitle
added for functioncalplot
. Defaults toNone
. - Argument
yearcolor
added for functioncalplot
. Defaults tolightgray
(in contrast towhitesmoke
, the default value forfillcolor
). - Default colormap
cmap
for functioncalplot
changed toviridis
.
Usage
See the documentation.
Installation
To install the latest release via PyPI using pip:
pip install calplot
Todo
- Option to add a seperating line between months.
- Option to plot a rounded value for the day or plot the day of month for each mesh grid cell.
- Option to change horizontal alignment (for example, to the left) for month labels.