晶羽科技-解读点评影视小说作品

微信
手机版

python炒股绘制折线图(Python绘制折线图)

2022-01-14 19:20 作者:linglinglingling灵 围观:

这里说一个很简单的Python绘制折线图的方法

#折线图

import numpy as np

import matplotlib.pyplot as plt

x=np.linspace(0,2,50)

plt.plot(x,x,label='linear')

plt.plot(x,x**2,label='quadratic')

plt.plot(x,x**3,label='cubic')

plt.xlabel('x label')

plt.ylabel('y label')

plt.title('simple plot')

plt.legend()

plt.show()

Python绘制折线图

相关文章