plt.text(0,0,“test”, horizontalalignment=“center”, color=“green” )
其中:
第一个0代表坐标轴x的位置
第二个0代表坐标轴y的位置
test是我们要显示的字符串
center代表对其方式居中对其
color代表显示的演示
我们将坐标修改为(0.5,1)显示结果如下:
plt.text(0,0,“test”, horizontalalignment=“center”, color=“green” )
其中:
第一个0代表坐标轴x的位置
第二个0代表坐标轴y的位置
test是我们要显示的字符串
center代表对其方式居中对其
color代表显示的演示
我们将坐标修改为(0.5,1)显示结果如下: