Skip to content

Instantly share code, notes, and snippets.

@wzhd
Last active September 18, 2015 01:53
Show Gist options
  • Save wzhd/7e5996313a8411959836 to your computer and use it in GitHub Desktop.
Save wzhd/7e5996313a8411959836 to your computer and use it in GitHub Desktop.
A simple Venn diagram
from matplotlib import pyplot as plt
import numpy as np
from matplotlib_venn import venn3, venn3_circles
plt.figure(figsize=(4,4))
v = venn3(subsets=(0,3,1,1,0,1,0), set_labels = ('affine', 'convex', 'cone'))
v.get_label_by_id('011').set_text('convex\ncone')
v.get_label_by_id('001').set_text('other\ncone')
v.get_label_by_id('010').set_text('')
v.get_label_by_id('110').set_text('')
plt.title("Spaces")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment