Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing axes argument in calendar_plot #31

Open
Gaiana opened this issue Jan 25, 2023 · 0 comments
Open

Missing axes argument in calendar_plot #31

Gaiana opened this issue Jan 25, 2023 · 0 comments

Comments

@Gaiana
Copy link

Gaiana commented Jan 25, 2023

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.
"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant