2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > python加粗字体_python画画加粗_Matplotlib'粗体'字体 - python

python加粗字体_python画画加粗_Matplotlib'粗体'字体 - python

时间:2018-12-28 14:22:41

相关推荐

python加粗字体_python画画加粗_Matplotlib'粗体'字体 - python

跟随this example:

import numpy as np

import matplotlib.pyplot as plt

fig = plt.figure()

for i, label in enumerate((A, B, C, D)):

ax = fig.add_subplot(2,2,i+1)

ax.text(0.05, 0.95, label, transform=ax.transAxes,

fontsize=16, fontweight=old, va= op)

plt.show()

我得到以下输出:

为什么我的标签重量正常,而文档显示此标签应该创建粗体字母A,B,C,D?

我也收到此警告:

Warning (from warnings module):

File "C:\Python27\lib\site-packages\matplotlib\font_manager.py", line 1228

UserWarning)

UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=italic:variant=normal:weight=bold:stretch=normal:size=x-small. Returning C:\Python27\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf

参考方案

尝试

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。