pythonplot()函数的基本介绍
pythonplot()函数的基本介绍
本文教程操作环境:windows7系统、Python3.9.1,DELLG3电脑。
1、说明
matplotlib.pyplot是绘制各类可视化图形的命令子库,相当于快捷方式。
2、语法
plt.plot(x,y,format_string,**kwargs)
x:x轴数据,列表或数组,可选。
y:y轴数据,列表或数组,可选。
format_string:控制曲线的格式字符串,可选。
kwargs:第二组或者更多(x,y,format_string,**kwargs)
3、实例
importmatplotlib.pyplotasplt
importnumpyasnp
a=np.arange(10)
plt.plot(a,a*1.5,a,a*2.5,a,a*3.5,a,a*4.5)
plt.show()
以上就是pythonplot()函数的基本介绍,希望能对大家有所帮助。更多Python学习教程请关注IT培训机构:千锋教育。

猜你喜欢LIKE
相关推荐HOT
更多>>
python中mat是什么意思?
python中mat是什么意思?本文教程操作环境:windows7系统、Python3.9.1,DELLG3电脑。python的numpy库提供矩阵运算的功能,因此我们在需要矩阵运...详情>>
2023-11-10 23:22:48
python上下文管理的使用场景
python上下文管理的使用场景本文教程操作环境:windows7系统、Python3.9.1,DELLG3电脑。1、上下文管理的使用场景凡是要在代码块前后插入代码的...详情>>
2023-11-10 20:07:44
python常量折叠是什么
python常量折叠是什么1、概念所谓常量折叠,指的是在编译时就查找并计算常量表达式,而不是在运行时再对其进行计算,从而会使运行时更加精简和...详情>>
2023-11-10 19:11:50
pythonTCP与UDP的不同点分析
python中TCP与UDP的不同点分析(推荐操作系统:windows7系统、Python3.9.1、DELLG3电脑。)1、不同点面向连接(确认有创建三方交握,连接已创建才...详情>>
2023-11-10 18:16:05热门推荐
技术干货






