![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
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 get the list of font family (or Name of Fonts) in Matplotlib?
o get the list of font family in Matplotlib, we can take the following steps −
- Iterate fonts manager ttflist and print the names.
- Iterate fonts manager afmlist and print the names.
Example
import matplotlib.font_manager as fm for f in fm.fontManager.ttflist: print(f.name) for f in fm.fontManager.afmlist: print(f.name)
Output
STIXNonUnicode STIXGeneral STIXSizeFiveSym cmr10 ... ... ... Nimbus Sans L Bitstream Charter Nimbus Sans L Nimbus Sans L
Advertisements