Closed WangSoybean closed 4 years ago
It's not a pyvenn question per se, but in general with matplotlib-based packages, you can use matplotlib.pyplot.switch_backend()
:
from matplotlib.pyplot import switch_backend
from venn import venn
switch_backend("Agg")
ax = venn({
"First": {"A", "B", "C"},
"Second": {"B", "C", "D", "E"}
})
ax.figure.savefig("test.pdf", bbox_inches="tight")
No follow-up for a month since a solution was posted – assumed resolved, closing it now. If not, ask away!
How to use a non-interactive backend?