I am using the matplotlib_venn.venn2 function to plot the Venn diagram in a single figure. My code:
from matplotlib_venn import venn2
from matplotlib import pyplot as plt
total = 150
# depict venn diagram
venn2(subsets = (61, 48, 13), set_labels = ('Advanced Mathematics', 'linear Algebra'),
set_colors=('#00909e', '#f67280'),
subset_label_formatter=lambda x: f"{(x/total):1.0%}"
)
plt.show()
Result:
However, I wanted to add the topics of each subject inside the circle, for example inside Advanced Mathematics the following topics should be written (Calculus and analysis, Logic, Number theory) and Linear Algebra topics (Mathematical operations, Matrix inverses and determinants) should be written inside Linear Algebra.
you can set custom text to labels