Skip to content

Missing axes argument in calendar_plot #31

@Gaiana

Description

@Gaiana

Hello, I wanted to thank you for this amazing library! It's been really usefull for my projects. I detected what seems to be a bug in the calendar_plot arguments: there is no ax argument, but it appears in the documentation. I can make a pull request with a fix if that's ok.

july/src/july/plot.py

Lines 207 to 242 in 953ef3e

def calendar_plot(
dates: List[Union[str, datetime.date, datetime.datetime]],
data: List[Any],
cmap: Union[str, LinearSegmentedColormap, ListedColormap] = "july",
value_label: bool = False,
date_label: bool = False,
weeknum_label: bool = True,
month_label: bool = True,
value_format: str = "int",
title: bool = True,
ncols: int = 4,
figsize: Optional[Tuple[float, float]] = None,
**kwargs
) -> Axes:
"""Create calendar shaped heatmap of all months im input dates and data.
Args:
dates: List like data structure with dates.
data: List like data structure with numeric data.
cmap: Colormap. Any matplotlib colormap works.
value_label: Whether to add value label inside grid.
date_label: Whether to add date label inside grid.
weeknum_label: Whether to label the short axis with week numbers.
month_label: Whether to add month label(s) along the long axis.
value_format: Format of value_label: 'int' or 'decimal'. Only relevant if
`value_label` is True.
title: Title of the plot.
ncols: Number of columns in the calendar plot.
ax: Matplotlib Axes object.
figsize: Figure size. Defaults to sensible values determined from 'ncols'.
kwargs: Parameters passed to `update_rcparams`. Figure aesthetics. Named
keyword arguments as defined in `update_rcparams` or a dict with any
rcParam as key(s).
Returns:
Matplotlib Axes object.
"""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions