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

Coords kwarg added to plot_autocorr function #2404

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lucifer4073
Copy link

@lucifer4073 lucifer4073 commented Dec 20, 2024

Fixes #2288

Added the coords keyword argument to the plot_autocorr function in ArviZ. Used to specify variable names to be plotted. Made it consistent with other plotting functions such as plot_forest and plot_trace.

Example usage:

axes = az.plot_autocorr(
   data,
   var_names=["mu", "theta"],
   coords={"school": ["Deerfield", "Hotchkiss"]},
   backend="matplotlib"
)

Other points:

  • Test case added -> test_plot_autocorr_coord
  • Example for plot_autocorr modifed to show utility of the coords keyword.

📚 Documentation preview 📚: https://arviz--2404.org.readthedocs.build/en/2404/

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.72%. Comparing base (adb2fef) to head (005e2d7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2404   +/-   ##
=======================================
  Coverage   86.72%   86.72%           
=======================================
  Files         124      124           
  Lines       12908    12910    +2     
=======================================
+ Hits        11194    11196    +2     
  Misses       1714     1714           

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

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 the "coords" kwarg to plot_autocorr
1 participant