【发布时间】:2021-08-03 09:04:22
【问题描述】:
我想创建一个带有子图的图形,其中每个子图的大小与其包含的数据成正比。例如:
from matplotlib import pyplot as plt
from matplotlib_venn import venn2
data_dict = {'foo': (10,7,5), 'bar': (2,6,3), 'baz': (22,17,12)}
figure, axes = plt.subplots(1, 3)
i = 0
for x in ['foo','bar','baz']:
venn2(subsets = data_dict[x], set_labels=('A', 'B'), ax=axes[i])
i += 1
我想通过每个维恩图(A+B+相交)中的数字总和来缩放每个子图的大小。我该怎么做?
【问题讨论】:
标签: python matplotlib subplot