如何在情节中绘制Venn3
我找到了以下代码,
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")
我不知道该怎么做就是绘制图中的H。我正在尝试在我的网站上实现关键字搜索的Venn2和Venn3图
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是a Web搜索:
这 通过您的数据函数:
This is the first result of a web search:
Than, using that function with your data: