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

Add example for plot_func #311

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Conversation

rohanbabbar04
Copy link
Contributor

@rohanbabbar04 rohanbabbar04 commented Feb 4, 2024

Description

Fixes #308
Added a small custom plot example using plot_func in docs/examples/observed_space_examples.ipynb
@aloctavodia do check once

Checklist

  • Code style is correct (follows pylint and black guidelines)
  • Includes new or updated tests to cover the new feature
  • New features are properly documented (with an example if appropriate)
  • Includes a sample plot to visually illustrate the changes (only for plot-related functions)
  • Widget states have been properly saved (only for notebooks with widgets) see for details.

@rohanbabbar04 rohanbabbar04 changed the title minor: Add example for plot_func Add example for plot_func Feb 4, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6f270f6) 80.15% compared to head (635aad7) 80.13%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #311      +/-   ##
==========================================
- Coverage   80.15%   80.13%   -0.03%     
==========================================
  Files          34       34              
  Lines        4178     4178              
==========================================
- Hits         3349     3348       -1     
- Misses        829      830       +1     

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

@aloctavodia
Copy link
Contributor

Thanks @rohanbabbar04.

I have two suggestions

  • Add a sentence saying something like "predictive_explorer supports 3 types of plots, empirical cdfs, kdes and histogram. Besides, you can also add custom Matplotlib code..."

  • Change the name of the function from hist to custom_hist or something similar.

@rohanbabbar04
Copy link
Contributor Author

Thanks @aloctavodia,

  • Have added the line - predictive_explorer supports three types of plots: empirical cumulative distribution functions (CDFs), kernel density estimations (KDEs), and histograms. Additionally, you can also add custom Matplotlib code using the plot_func parameter.
  • Changed the function name from hist to custom_hist

@aloctavodia aloctavodia merged commit 3546694 into arviz-devs:main Feb 6, 2024
4 checks passed
@rohanbabbar04 rohanbabbar04 deleted the custom_plot branch February 10, 2024 07:20
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

Successfully merging this pull request may close these issues.

Add example of custom plot for predictive_explorer
3 participants