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

patch values stacked plot #1181

Merged
merged 3 commits into from
Nov 7, 2024
Merged

patch values stacked plot #1181

merged 3 commits into from
Nov 7, 2024

Conversation

juanitorduz
Copy link
Collaborator

@juanitorduz juanitorduz commented Nov 7, 2024

Closes #1148

Simply clip the contributions and add a warning.


📚 Documentation preview 📚: https://pymc-marketing--1181.org.readthedocs.build/en/1181/

@github-actions github-actions bot added the MMM label Nov 7, 2024
@juanitorduz juanitorduz requested a review from wd60622 November 7, 2024 11:25
@juanitorduz juanitorduz self-assigned this Nov 7, 2024
@juanitorduz juanitorduz changed the title clip values clip values stacket plot Nov 7, 2024
@juanitorduz juanitorduz changed the title clip values stacket plot clip values stacked plot Nov 7, 2024
Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.59%. Comparing base (5c08f7f) to head (12ccf70).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1181   +/-   ##
=======================================
  Coverage   95.59%   95.59%           
=======================================
  Files          39       39           
  Lines        4059     4064    +5     
=======================================
+ Hits         3880     3885    +5     
  Misses        179      179           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juanitorduz juanitorduz marked this pull request as draft November 7, 2024 11:48
@github-actions github-actions bot added tests bug Something isn't working labels Nov 7, 2024
@juanitorduz juanitorduz changed the title clip values stacked plot patch values stacked plot Nov 7, 2024
Copy link
Contributor

@wd60622 wd60622 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocker. Lets get fix through

@@ -1126,7 +1127,17 @@ def plot_grouped_contribution_breakdown_over_time(
area_params = dict(stacked=True, ax=ax)
if area_kwargs is not None:
area_params.update(area_kwargs)
all_contributions_over_time.plot.area(**area_params)
try:
all_contributions_over_time.plot.area(**area_params)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts of check on frame values instead of try except?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cheks are done in the plot.area function itself and can have many edge cases. For now lets direct the responsibility to matplotlib 🙏

@juanitorduz juanitorduz marked this pull request as ready for review November 7, 2024 12:57
@juanitorduz juanitorduz merged commit 94a8096 into main Nov 7, 2024
13 checks passed
@juanitorduz juanitorduz deleted the fix-stack-plot branch November 7, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plot_grouped_contribution_breakdown_over_time fails with negative values in group
2 participants