Open tomwagstaff-opml opened 1 year ago
Thanks for the report @tomwagstaff-opml
This is very odd, since I see that your python is 3.10.9, IPython 8.9.0, and seaborn 0.11.1, which is similar to what's used by gh actions (python is 3.10.6, IPython 8.9.0, and seaborn 0.11.1): https://import-balance.org/docs/tutorials/quickstart/
So it's not clear to me why this happens for you.
@stevemandala are you able to reproduce the issue with the seaborn plots on your machine?
I gave the tutorial a run in my Windows-based jupyter instance, but I wasn't able to repro the plotting issue from jupyter; plots seemed to output as expected.
Curious if this is an issue on the balance side or with the Seaborn plotting itself. @tomwagstaff-opml Do sample Seaborn plots like the one below work for you?
import seaborn as sns
penguins = sns.load_dataset("penguins")
sns.histplot(data=penguins, x="flipper_length_mm", hue="species", multiple="stack")
Hi @stevemandala,
Sorry for the delay in replying, I'm afraid I ran out of time to devote to this.
The issue here might be that I'm using the RStudio IDE to run Python. When I ran your code I just got the description of the object on the console: <AxesSubplot: xlabel='flipper_length_mm', ylabel='Count'>
However, when I added these 2 lines:
import matplotlib.pyplot as plt
plt.show()
Then your example appeared in my plot pane.
Thanks Tom, that sounds like a good solution. Did you place your lines before the plot() commands or after them?
On Fri, 10 Feb 2023, 20:08 Tom Wagstaff, @.***> wrote:
Hi @stevemandala https://github.com/stevemandala,
Sorry for the delay in replying, I'm afraid I ran out of time to devote to this. The issue here might be that I'm using the RStudio IDE to run Python. When I ran your code I just got the description of the object on the console: <AxesSubplot: xlabel='flipper_length_mm', ylabel='Count'>
However, when I added these 2 lines:
import matplotlib.pyplot as plt plt.show()
Then your example appeared in my plot pane.
— Reply to this email directly, view it on GitHub https://github.com/facebookresearch/balance/issues/29#issuecomment-1426161871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHOJBUWD6GVIHQ2U6JHDCTWWZ7YZANCNFSM6AAAAAAUMQKQ3E . You are receiving this because you were mentioned.Message ID: @.***>
Ahh - good question - I added my lines afterwards - but this only worked with Steve's example, didn't try it with the balance package commands
@tomwagstaff-opml thanks for the report! I've updated this issue to be "When using the RStudio IDE to run Python: Seaborn plots not working".
If you get around to it, could you please try using a jupyter notebook to run the example, and see if it works fine for you there? Even if not - it's fine - I think you've given us enough input to better understand this.
To be honest - I doubt that we'll prioratize supporting RStudio's IDE in the near future. But if you or someone else would like to try and do a PR, we'd be happy to review it (and if it works, to include it back into balance
)
Thanks again Tom!
Hi guys,
As reported before, the Seaborn-based plots don't seem to be working in a Python 3.10 environment on my Windows machine e.g. this line from the quick start:
adjusted.covars().plot(library = "seaborn", dist_type = "kde")
. It doesn't throw an error, just doesn't output any plots.Here is my session info as requested by @talgalili - hope it helps!