
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
List of Available Fonts for Matplotlib
To get a list of all the fonts currently available for matplotlib, we can use the font_manager.findSystemFonts() method.
Steps
Print a statement.
Use font_manager.findSystemFonts() method to get a list of fonts availabe.
Example
from matplotlib import font_manager print("List of all fonts currently available in the matplotlib:
") print(*font_manager.findSystemFonts(fontpaths=None, fontext='ttf'), sep="
")
Output
/usr/share/fonts/truetype/Nakula/nakula.ttf /usr/share/fonts/truetype/ubuntu/Ubuntu-L.ttf /usr/share/fonts/truetype/tlwg/Loma-BoldOblique.ttf ................................................................. ............................................................................ ................................................................................. ........ /usr/share/fonts/truetype/lohit-malayalam/Lohit-Malayalam.ttf /usr/share/fonts/truetype/tlwg/TlwgTypist-Oblique.ttf /usr/share/fonts/truetype/liberation2/LiberationMono-Bold.ttf
Advertisements