Closed shinokada closed 4 years ago
I don't think you need matlotlib-venn to plot a single circle. Just draw a circle patch and a rectangle patch along with the needed labels.
I got up to this so far. Only U is missing. Any idea how to add U outside the box?
import pylab as plt
from matplotlib_venn import venn3, venn3_circles
v = venn3(subsets=(1,1,0,1,0,0,0),set_labels = ('','',''))
# remove numbers
for area in ['01', '10']:
txt = v.get_label_by_id(area)
if txt: txt.set_text('')
v.get_patch_by_id('100').set_color('white')
v.get_patch_by_id('001').set_color('white')
v.get_label_by_id('010').set_text('A')
v.get_label_by_id('001').set_text("A'")
# changing background
plt.gca().set_axis_on()
plt.gca().set_facecolor('white')
plt.title("Negation", fontsize=30)
plt.show()
I got it.
I added the following.
plt.text(-1, 0.2, r'U', fontsize=15)
I am trying to create the following diagram with the matplotlib-venn.
I have the following code but as you can see there are some problems.