新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)Python教程:python plot()函數(shù)的基本介紹
本文教程操作環(huán)境:windows7系統(tǒng)、python 3.9.1,DELL G3電腦。

1、說明
matplotlib.pyplot是繪制各類可視化圖形的命令子庫,相當(dāng)于快捷方式。
2、語法
plt.plot(x, y, format_string, **kwargs)
x:x軸數(shù)據(jù),列表或數(shù)組,可選。
y:y軸數(shù)據(jù),列表或數(shù)組,可選。
format_string:控制曲線的格式字符串,可選。
kwargs:第二組或者更多(x, y, format_string, **kwargs)
3、實例
import matplotlib.pyplot as plt import numpy as np a = np.arange(10) plt.plot(a, a*1.5, a, a*2.5, a, a*3.5, a, a*4.5) plt.show()
以上就是python plot()函數(shù)的基本介紹,希望能對大家有所幫助。更多Python學(xué)習(xí)指路:創(chuàng)新互聯(lián)python教程
分享題目:創(chuàng)新互聯(lián)Python教程:python plot()函數(shù)的基本介紹
轉(zhuǎn)載來于:http://www.dlmjj.cn/article/cdieehe.html


咨詢
建站咨詢
