【发布时间】:2013-09-19 16:41:42
【问题描述】:
关注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='bold', va='top')
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
OP 分辨率
- 来自deleted answer posted by the OP
Sep 15, 2013- 好的,是
matplotlib的安装有问题
- 好的,是
【问题讨论】:
-
根据 OPs 声明,我投票结束这个问题,因为这个问题不可重现。
标签: python-2.7 matplotlib