数据可视化之matplotlib实战:plt.title()函数 添加图形内容的标题

    科技2022-07-10  221

    import matplotlib.pyplot as plt import numpy as np x = np.linspace(0.05,10,1000) y = np.sin(x) plt.plot(x,y,ls="-.",lw=2,c="c",label="plot figure") plt.legend() plt.title("y=sin(x)") plt.show()

    Processed: 0.029, SQL: 8