matplotlib_venn left top heading does not fit

79 Views Asked by At

The following code cut the legend of the right top circle.

image

Is there a way to move the legend?

from matplotlib import pyplot as plt
from matplotlib_venn import venn3_unweighted

plt.style.use('seaborn')

plt.figure(figsize=(5, 5))
#plt.title("Venn Diagram For Three Random Sets")
#Nsyl (33,773 genes)
# (Set1,Set2,1n2,Set3,1n3,2n3,1n2n3)
venn3_unweighted(subsets=(703, 659, 5205, 3444, 1583, 1580, 17280),
      set_labels=('Nlab (45,309 genes)', 'Nqld (49,639 genes)', 'Ngla (53,626 genes)'))

plt.show()
1

There are 1 best solutions below

1
ML-Nielsen On

Have you tried changing the layout of the figure to tight?

plt.tight_layout()

It will not really move the label text, but it should make sure to not cut it off.