-
-
Notifications
You must be signed in to change notification settings - Fork 401
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 coords and ax arguments to all plotting functions #835
Conversation
Modified get_coords to work on tuple or lists of xarray datasets too
24aac74
to
af460e8
Compare
It is added as ax_tuple argument to mimic the output type of the function.
arviz/plots/jointplot.py
Outdated
@@ -20,6 +20,7 @@ def plot_joint( | |||
fill_last=True, | |||
joint_kwargs=None, | |||
marginal_kwargs=None, | |||
ax_tuple=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.
Maybe axes
?
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.
I'd rather ax
like the other functions or something clearly different like I tried. It it is okey I'll change it by ax
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.
It is conceptually different than the other functions but you can always overlay plots doing:
ax = plot_xyz(data1)
az.plot_xyz(data2, ax=ax)
so maybe for the end users there is not much difference
Is this ready to merge? |
Yes! I was originally planning on addind |
Most
plot_xyz
havecoords
andax
arguments, but there are some exceptions. This PR intends to add these arguments in all functions (if they make sense,plot_compare
will continue not havingcoords
argument).I have started with
plot_forest
, fixes #813. Similarly to what happened inplot_density
, it can also accept a list of inferencedata objects, so I modifiedget_coords
. I set it to accept 3 combinations:This allows to handle idata objects with different dimensions, but I am not totally convinced by this approach. Any ideas will be welcome.
ax
argument added toplot_joint