-
-
Notifications
You must be signed in to change notification settings - Fork 419
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 quantile feature to forestplot ridgeplot #1047
Add quantile feature to forestplot ridgeplot #1047
Conversation
Currently implemented for There is a problem of having step size too small in plots. |
As a workaround you can stretch the figure along the x-axis, something like |
@aloctavodia I tinkered a little with figsize generation, and below size seems okayish:
About alternate shades for quantiles, Should I add that also in this? Should alternate shades also be added to normal kdeplot with quantiles? |
Not sure, but I guess a good solution is to work on this first and after merge work on a separated PR for the shade feature. For the next PR we may even think on a general function that is called by the kdeplot and the ridgeplot. |
I do not think the function should change the figsize automatically, the user should be in control of the figsize |
Okay, Let's get this one done first. I have changed the figsize for ridgeplot_quantiles, if it is not explicitly defined by the user. It's creating a figure of |
@@ -58,7 +59,10 @@ def plot_forest( | |||
) | |||
|
|||
if figsize is None: | |||
figsize = (min(12, sum(width_ratios) * 2), plot_handler.fig_height()) |
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.
ohh, sorry I misread your previous example. This is OK
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.
LGTM
@@ -484,7 +505,7 @@ def treeplot(self, qlist, credible_interval): | |||
|
|||
def ridgeplot(self, mult, ridgeplot_kind): | |||
"""Get data for each ridgeplot for the variable.""" | |||
xvals, yvals, pdfs, colors = [], [], [], [] | |||
xvals, yvals, pdfs, pdfs_q, colors = [], [], [], [], [] |
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.
this could be
xvals = yvals = pdfs = pdfs_q = colors = []
but it is not that important, so no need to change it
Description
Fixes #756 . Add new feature quantiles to ridgeplot of forestplot.
Checklist
PR format?