Hello all!
I try to display a Venn diagram (using venn2 function).
So I tried this code:
fig = venn2(subsets=(10, 5, 2, 1), set_labels=(āGroup Aā, āGroup Bā,āGā))
st.pyplot(fig)
But I get an AttributeError: āVennDiagramā object has no attribute āsavefigā
I understand why it happens but I canāt find a way to display my venn diagramā¦
Thanks!!
Hello @danarub, welcome to the community!
I have not tested the library, Iām going to take a wild guess and suppose VennDiagram
is not the actual Matplotlib figure.
Using Support for Pandas charts? - #2 by andfanilo, does the following work? It looks like ax
support was added in v0.6.
fig, ax = plt.subplots()
venn2(subsets=(10, 5, 2, 1), set_labels=("Group A", "Group B","G"), ax=ax)
st.pyplot(fig)
Have a nice day Streamlitinā
Fanilo
Perfect thank you so much!!!
1 Like