Closed gabyrech closed 11 years ago
Hello, you have at least two ways here. Firstly, you can change the global default font for all of matplotlib before creating the venn plot:
font = {'family' : 'sans',
'weight' : 'bold',
'size' : 22}
matplotlib.rc('font', **font)
If you want a more fine-grained control, you have access to all the labels of a matplotlib-venn plot as Text elements using the get_label_by_id
function. You are rather free to do what you want with them, including changing properties, text, or moving around.
d = matplotlib_venn.venn2((1,2,3))
label = d.get_label_by_id('11') # Those are subset labels (i.e. numbers)
label.set_fontsize(22)
label.set_family('serif')
label.set_x(label.get_position()[0] + 0.1)
d.get_label_by_id('A').set_text('$x^2$') # Those are set labels
d.get_label_by_id('A').set_fontsize(22)
Thanks!
HI!, Thank you very much for the package! It is very useful and easy to use! I just wondering if there is some way to change the font style and font size for the numbers inside the circles. Thank you very much! Regards Gabriel