轴的粗斜体标签

问题描述 投票:0回答:1

如何用xlabel粗体和斜体写这个x?

import matplotlib.pyplot as plt
import font

fig, ax = plt.subplots()
ax.annotate('x', xy=(0.93, -0.01), ha='left', va='top', xycoords='axes fraction', weight='bold')
python-3.x matplotlib axis
1个回答
0
投票

使用weightstyle参数:

ax.annotate(..., weight='bold', style='italic')
© www.soinside.com 2019 - 2024. All rights reserved.