第3节课Matplotlib作业
第3节课Matplotlib作业
练习1
为了对某一产品进行合理定价,我们对此类商品进行了试销实验,价格与需求量数据如下。利用图表分析规律。
代码展示:
frommatplotlibimportpyplotasplt
price=[60,80,40,30,70,90,95]
sales=[100,50,120,135,65,45,40]
plt.scatter(price,sales)
plt.xlabel("price")
plt.ylabel("sales")
plt.show()
如图所
原创
2020-08-15 10:55:15 ·
155 阅读 ·
0 评论