- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to modify the font size in Matplotlib-venn?
To modify the font size in Matplotlib-venn, we can use set_fontsize() method.
Steps
- Set the figure size and adjust the padding between and around the subplots.
- Create three sets for Venn diagram.
- Plot a 3-set area-weighted Venn diagram.
- To set the set_labels and subset_labels fontsize, we can use set_fontsize() method.
- To display the figure, use show() method.
Example
from matplotlib import pyplot as plt from matplotlib_venn import venn3 plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True set1 = {'a', 'b', 'c', 'd'} set2 = {'a', 'b', 'e'} set3 = {'a', 'd', 'f'} out = venn3([set1, set2, set3], ('Set1', 'Set2', 'Set3')) for text in out.set_labels: text.set_fontsize(25) for text in out.subset_labels: text.set_fontsize(12) plt.show()
Output
- Related Articles
- How to increase plt.title font size in Matplotlib?
- How to change the font size of scientific notation in Matplotlib?
- How to set the font size of Matplotlib axis Legend?
- How to change xticks font size in a matplotlib plot?
- Python Matplotlib Venn diagram
- How do I change the font size of the scale in Matplotlib plots?
- Modify the default font in Python Tkinter
- How to increase the font size of the legend in my Seaborn plot using Matplotlib?
- Auto adjust font size in Seaborn heatmap using Matplotlib
- How to modify the size of column in MySQL table?
- How can I change the font size of ticks of axes object in Matplotlib?
- How to change font size in HTML?
- How to change font size in ttk.Button?
- How to change the font size using CSS?
- How to change the font size of textView in android?

Advertisements