-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Distinguish plot and show for associations parameters #49
Comments
Btw, if you this or #48 are cool, I can also create a pull request. Let me know what you think. |
Hey @Baukebrenninkmeijer - isn't this already solved in version 0.5.0? The output is now a dict, with the dataframe and plot.
|
Yes, but the plot doesn't need to be returned unfortunately. The plot is still in the global matplotlib statespace, and thus will be rendered. At least, that was my experience today. |
I'll see if I can get an example tomorrow. |
I think I understand what you're saying |
As you can see below, I have set It can be fixed fairly simple by setting a parameter that determines whether it will even create a plot, like I suggested above. It would be nice to do it in a backward compatible mode, but that might be a bit confusing if |
Check this PR: #50 |
Yes, great work! Also really like the solution :). |
This is more of a suggestion, since I find myself working around it.
Describe the new feature:
Have the option to show the plot (currently done with the
plot
parameter), but also the option to plot (currently no option). The functionassociations
is very neat, but you don't always want to plot the results, but just get the dataframe. I suggest adding ashow
parameter.What is the current outcome?
Currently, there is no way not to plot (i.e. create matplotlib object). This means, when working in a notebook, it will always show the plot at the end of a cell, disregarding the value of the
plot
parameter.Is it backward-compatible?
No.
show
would replaceplot
in functionality, andplot
would get a different meaning.My current workaround is to create a figure/ax before calling associations, and passing
ax
to associations. Then I callplt.close(ax)
to remove the plot.The text was updated successfully, but these errors were encountered: