@axj1816 在 linux赛博月饼 中发帖
[image]
import matplotlib.pyplot as plt
from matplotlib import rcParams
设置字体为 SimHei
rcParams[‘font.sans-serif’] = [‘SimHei’]
rcParams[‘axes.unicode_minus’] = False
创建一个圆形
circle = plt.Circle((0.5, 0.5), 0.4, color=‘gold’, ec=‘brown’, lw=5)
创建一个图形和轴
fig, ax = plt.subplots()
添加圆形到轴
ax.add_artist(circle)
添加标签
ax.text(0.5, 0.5, ‘Linux do 月饼 @axj1816’, fontsize=15, ha=‘center’, va=‘center’, ...