首页 > 编程知识 正文

matplotlib中文手册,minitab帕累托图制作步骤

时间:2023-05-04 11:48:23 阅读:129671 作者:783

点击上面的蓝色小字,关注“hxsdsy聊Python

重磅干货,第一时间送到

来源: python数据分析禅

今天我给你看16个用matlibplot画画的常用技巧。 我也记不太清楚了。 不说废话,就这样晒干。

1 .添加文本框向文本中添加背景框

importmatplotlib.pyplotaspltplt.rcparams [ ' font.sans-serif ' ]=[ ' simhei ' ] fig=PLT.figure (fig,axe=PLT ) ' alpha':0.5, ' pad':0.7}文本框PLT.show(2.添加指示箭头importmatplotlib.pyplotaspltimportnumpyasnplt.rcparams [ ' axes.unicode 0.01 ) s=NP.sin )2*NP.pi*t ) axe.plot(t ) t,s,linestyle 1),arrowprops=DICT(facecolor='red ',shririd ) 垂直对齐=' center ',垂直对齐) ),中心axe=PLT.subplots (NP.random.seed ) 100 ) x=NP.arrignment

4 .条形图横排fig,axe=PLT.subplots (data _ m=(40,60,120,180,20,200 ) index=np.arange(6)6) width=0

5 .移动坐标轴位置importmatplotlib.pyplotaspltimportnumpyasnpfig=PLT.figure () fig,然后单击axe=PLT.subplots (axe.spines [ ' rre ] . set_color ) ' none ' (spines ) ) top ) ) nolor 1) axe.spines [ ' left ' ].set _ position (' data ',1 ) ) PLT.splt . 设置axe 8000 ) PLT.show(7.更改坐标轴颜色的importmatplotlib.pyplotaspltimportnumpyasnpfig=PLT.figure ) ) fig,axe=PLT . axe=PLT.subplots (axe.set _ x ticks ([ 0,1,2,3,4,5 ] ) plt.show )9.更改刻度的fig=plt.figure ) ) fig ' Bicycle ',' driving ' ] (PLT.show ) )92、3、4、5 ) axe.set_xticklabels(['taxi ',' Metro ',' Walk,) 10 ) ) plt.show ) ) 11 .网格线fig=plt.figure ) ) fig,axe=plt.subplots ) ) axe.grid ) true ) pig 180、20、200

13 .更改图案fig,然后单击axe=PLT.subplots (data _ m=(40,60,120,180,20,200 ) index=np.arange(6)6) axe.bblots

模式列表: plt.style.available ['bmh '、' classic '、' dark_background '、' fast '、' fivethirtyeight '、' ggplot ' seaborn-dark '、' seaborn-darkgrid '、' seaborn-deep '、' seaborn-darkgrid '、' seaborn-deep '、'

14 .表fig,axe=PLT.subplots (data_m=(40,60,120,180,20,200 ) data _ m ) 30,100,150,30,20,20 color='b ',bottom=data_m,label=data_f ) rows=(male,) female,(columns=) taxi,(Metro,) Walk,)

15 .饼图分离fig,axe=PLT.subplots(labels='taxi '、' Metro '、' Walk '、' Bus '、' Bicycle '、' drive ' sizes=[

16 .绘制的图像fig,axe=PLT.subplots(labels='taxi ',' Metro ',' Walk ',' Bus ',' Bicycle ',' drive'sizes=[ 0.1

《剑指offer》这本书大家会像雷一样聆听吧。 基本上只要是程序员就一定要用这本书。 书中分析了50个典型的程序员面试问题,从基础知识、代码质量、解题思路、优化效率和综合能力五个方面系统整理了影响面试的五个要点。-END-

是程序员找工作必备的一本书。

3358 www.Sina.com/http://www.Sina.com/http://www.Sina.com/3358 www.Sina.com.Sina.com

? 长按上面的二维码2秒钟返回“offer”,即可获取数据

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。