hanslovsky

python

Nov 16th, 2015
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. from matplotlib import pyplot as plt
  2. from matplotlib_venn import venn2
  3. import numpy as np
  4.  
  5. v = venn2(subsets = (3, 2, 1))
  6. v.get_label_by_id('10').set_text(chr(70)+chr(117)+chr(110))
  7. v.get_label_by_id('01').set_text(chr(83)+chr(109)+chr(97)+chr(114)+chr(116))
  8. v.get_label_by_id('11').set_text('')
  9. v.get_label_by_id('A').set_text('')
  10. v.get_label_by_id('B').set_text('')
  11. plt.annotate(
  12.     chr(89)+chr(117)+chr(114)+chr(117),
  13.     xy=v.get_label_by_id('11').get_position()+np.array([0.025,0.36]),
  14.     xytext=(0.2,0.5),
  15.     arrowprops=dict(arrowstyle='->', connectionstyle='arc3,rad=0.5',color='gray'))
  16.  
  17. plt.annotate(
  18.     '',
  19.     xy=[-0.75,0.5],
  20.     xytext=(-0.75,-0.5),
  21.     arrowprops=dict(arrowstyle='->')
  22.     )
  23.  
  24. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment