I have found the following code
import math
from matplotlib import pyplot as plt
import matplotlib
from matplotlib_venn import venn2, venn3
import numpy as np
from matplotlib.figure import Figure
import plotly
# Define some sets
a = set(['a', 'b', 'c'])
b = set(['c', 'd', 'e'])
c = set(['e', 'f', 'a'])
s = [a, b, c]
# Plot it
matplotlib.pyplot.switch_backend('Agg')
h = venn3(s, ('A', 'B', 'C'))
fig=plotly.graph_objs.Figure()
graph_div = plotly.offline.plot(fig, auto_open = False, output_type="div")
What I don't know how to do is plot the h in the figure. I'm trying to implement a venn2 and venn3 diagram of keyword searches on my website
This is the first result of a web search:
Than, using that function with your data: