-
-
Notifications
You must be signed in to change notification settings - Fork 126
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 panel covariates to plot_cap()
and make it more flexible
#596
Add panel covariates to plot_cap()
and make it more flexible
#596
Conversation
Codecov Report
@@ Coverage Diff @@
## main #596 +/- ##
==========================================
- Coverage 85.36% 82.86% -2.50%
==========================================
Files 38 38
Lines 2944 3034 +90
==========================================
+ Hits 2513 2514 +1
- Misses 431 520 +89
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -133,9 +150,12 @@ def plot_cap(model, idata, covariates, use_hdi=True, hdi_prob=None, legend=True, | |||
Changing the global variable ``az.rcParam["stats.hdi_prob"]`` affects this default. | |||
legend : bool, optional | |||
Whether to automatically include a legend in the plot. Defaults to ``True``. | |||
transforms : dict, optional | |||
Transformations that are applied to each of the variables being plotted. The keys are the | |||
name of the variables, and the values are functions to be applied. Defaults to ``None``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name of the variables, and the values are functions to be applied. Defaults to ``None``. | |
name of the variables, and the values are functions to be applied. Defaults to `None`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, just curious why are the double ticks needed? I see it in other docstrings too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly it's because it doesn't render properly if it only has a single backtick. Maybe something changed and now it works with a single backtick, but previously I remember trying a single backtick without working
This is incredible, you basically rewrote this whole module, and now it can do so much more |
you're probably right just ignore me
…On Sunday, November 27, 2022, Tomás Capretto ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In bambi/plots/plot_cap.py
<#596 (comment)>:
> @@ -133,9 +150,12 @@ def plot_cap(model, idata, covariates, use_hdi=True, hdi_prob=None, legend=True,
Changing the global variable ``az.rcParam["stats.hdi_prob"]`` affects this default.
legend : bool, optional
Whether to automatically include a legend in the plot. Defaults to ``True``.
+ transforms : dict, optional
+ Transformations that are applied to each of the variables being plotted. The keys are the
+ name of the variables, and the values are functions to be applied. Defaults to ``None``.
If I remember correctly it's because it doesn't render properly if it only
has a single backtick. Maybe something changed and now it works with a
single backtick, but previously I remember trying a single backtick without
working
—
Reply to this email directly, view it on GitHub
<#596 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXBFYJ3T3W5WGK3BRAMM4TWKNRPPANCNFSM6AAAAAASMBVQKA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This is still WIP, but I'm excited about this PR since it makesplot_cap()
much more flexibleNow we can do something like
All the previous examples still work. I still need to update the the internal function_plot_cap_categoric()
and clean some details in_plot_cap_numeric()
. In particular I need to handle legends using the figure and not the axes.Edit: This is done. I decided to create a notebook to show the new features of
plot_cap()
. Basically, it still works for all the cases it used to work, but now it's more flexible. We can map groups to panels.https://gist.github.com/tomicapretto/1388437357d8520ff5ff2fcee39b7d1b