找到matplotlib的字体储存位置

复制代码
import matplotlib.font_manager as fm  
>>> fm.findfont('Arial') # 随便找一个不存在的就行
findfont: Font family ['Arial'] not found. Falling back to DejaVu Sans.
'/home/user01/.conda/envs/tcmdataset/lib/python3.11/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSans.ttf'

可以看到出现了路径'/home/user01/.conda/envs/tcmdataset/lib/python3.11/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSans.ttf'

ls一下/home/user01/.conda/envs/tcmdataset/lib/python3.11/site-packages/matplotlib/mpl-data/fonts/ttf/就能看到所有的了

相关推荐
㳺三才人子9 天前
初探 Data Analysis - Matplotlib
python·plotly·pandas·matplotlib
菜冻鱼10 天前
Python-sklearn-特征工程
开发语言·人工智能·python·机器学习·numpy·matplotlib·sklearn
cui_ruicheng19 天前
Python数据分析(十一):数据可视化与 Matplotlib
python·信息可视化·数据分析·matplotlib
编程阿峰21 天前
Python 环境配置(二)安装jupyter、matplotlib、numpy库
开发语言·python·jupyter·numpy·matplotlib
人工智能时代 准备好了吗22 天前
Python + Jinja2 + Matplotlib:AI回答采集报告自动化生成实现
人工智能·python·matplotlib
chouchuang25 天前
day-044-Matplotlib进阶-高级图表
matplotlib
你想知道什么?1 个月前
Matplotlib学习笔记
笔记·学习·matplotlib
风流 少年1 个月前
数据可视化:matplotlib、pyecharts、panda、seaborn
数据挖掘·数据分析·matplotlib
fai厅的秃头姐!1 个月前
Matplotlib
matplotlib
许彰午1 个月前
78_Python数据可视化matplotlib
python·信息可视化·matplotlib