使用“Times New Roman”设置加粗的 Matplotlib 标题
要在使用“Times New Roman”字体的情况下设置加粗的 Matplotlib 标题,我们可以使用 fontweight=”bold” 。
步骤
- 设置图形大小并调整子图之间和周围的间距。
- 创建一个图形和一组子图。
- 使用 numpy 创建 x 和 y 数据点。
- 使用 scatter() 方法绘制 x 和 y 数据点。
- 使用 fontname=”Times New Roman” 和 fontweight=”bold” 设置绘图标题。
- 使用 show() 方法显示图形。