python数据挖掘包matplotlib绘图

本文详细介绍了matplotlib这一Python著名绘图库的各个模块及其功能,包括面向对象的绘图方式和pyplot模块提供的类似MATLAB的绘图API,非常适合交互式绘图及嵌入GUI应用程序。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

原文博客:http://blog.youkuaiyun.com/pipisorry/article/details/37742423


模块

官网模块介绍:module
matplotlib 是Python最著名的绘图库,它提供了一整套和matlab相似的命令API,十分适合交互式地进行制图。而且也可以方便地将它作为绘图控件,嵌入GUI应用程序中。它的文档相当完备,并且Gallery页面 中有上百幅缩略图,打开之后都有源程序。因此如果你需要绘制某种类型的图,只需要在这个页面中浏览/复制/粘贴一下,基本上都能搞定。

matplotlib  
    matplotlib.afm  
    matplotlib.animation    
    matplotlib.artist   
    matplotlib.axis 
    matplotlib.backend_bases    
    matplotlib.backend_managers 
    matplotlib.backend_tools    
    matplotlib.backends.backend_pdf 
    matplotlib.backends.backend_qt4agg  
    matplotlib.backends.backend_qt5agg  
    matplotlib.backends.backend_svg 
    matplotlib.backends.backend_wxagg   
    matplotlib.cbook    
    matplotlib.cm   
    matplotlib.collections  
    matplotlib.colorbar 
    matplotlib.colors   
    matplotlib.container    
    matplotlib.dates    
    matplotlib.dviread  
    matplotlib.figure   
    matplotlib.finance  
    matplotlib.font_manager 
    matplotlib.fontconfig_pattern   
    matplotlib.gridspec 
    matplotlib.image    
    matplotlib.legend   
    matplotlib.legend_handler   
    matplotlib.lines    
    matplotlib.markers  
    matplotlib.mathtext 
    matplotlib.mlab 
    matplotlib.offsetbox    
    matplotlib.patches  
    matplotlib.path 
    matplotlib.patheffects  
    matplotlib.projections  
    matplotlib.projections.polar    
    matplotlib.pyplot   
    matplotlib.rcsetup  
    matplotlib.sankey   
    matplotlib.scale    
    matplotlib.sphinxext.plot_directive 
    matplotlib.spines   
    matplotlib.style    
    matplotlib.text 
    matplotlib.ticker   
    matplotlib.tight_layout 
    matplotlib.transforms   
    matplotlib.tri  
    matplotlib.type1font    
    matplotlib.units    
    matplotlib.widgets
绘图基础

matplotlib实际上是一套面向对象的绘图库,它所绘制的图表中的每个绘图元素,例如线条Line2D、文字Text、刻度等在内存中都有一个对象与之对应
为了方便快速绘图matplotlib通过pyplot模块提供了一套和MATLAB类似的绘图API,将众多绘图对象所构成的复杂结构隐藏在这套API内部。我们只需要调用pyplot模块所提供的函数就可以实现快速绘图以及设置图表的各种细节。pyplot模块虽然用法简单,但不适合在较大的应用程序中使用
应用如何在论文中画出漂亮的插图

matplotlib.pyplot模块

matplotlib的pyplot子库提供了和matlab类似的绘图API,方便用户快速绘制2D图表

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值