当我尝试使用包 matplotlib_venn 绘制维恩图时遇到了一些困难。
细节:
- 如果我使用数据 [13, 12, 73, 3, 3, 1, 12],可以按预期生成图形
- 如果我使用数据[13487, 12029, 7314, 336, 371, 17, 12611],则无法生成图表。
我应该怎么办?
提前致谢!
代码:
import matplotlib.pyplot as plt
from matplotlib_venn import venn3, venn3_circles
weights = [13, 12, 73, 3, 3, 1, 12] # these weights work
# weights = [13487, 12029, 7314, 336, 371, 17, 12611] # these weights do not work
labels = ['100', '010', '110', '001', '101', '011', '111']
fig, axis = plt.subplots(1, 1)
v = venn3(subsets=weights, ax=axis)
for label, weight in zip(labels, weights):
v.get_label_by_id(label).set_text(str(weight))
fig.show()