当前位置: 首页 > news >正文

肇庆市专注网站建设平台巩义网络推广公司

肇庆市专注网站建设平台,巩义网络推广公司,施工企业主要负责人包括,上海市住房和城乡建设管理委员会网站目录 1.绘图数据导入 2. sns.scatterplot绘制散点图 3.sns.barplot绘制条形图 4.sns.lineplot绘制线性图 5.sns.heatmap绘制热力图 6.sns.distplot绘制直方图 7.sns.pairplot绘制散图 8.sns.catplot绘制直方图 9.sns.countplot绘制直方图 10.sns.lmplot绘回归图 1.绘图数…

目录

1.绘图数据导入

2. sns.scatterplot绘制散点图

3.sns.barplot绘制条形图

4.sns.lineplot绘制线性图

 5.sns.heatmap绘制热力图

 6.sns.distplot绘制直方图

 7.sns.pairplot绘制散图

 8.sns.catplot绘制直方图

9.sns.countplot绘制直方图 

10.sns.lmplot绘回归图


1.绘图数据导入

"""1.数据获取介绍:
Seaborn库函数中有很多的数据集,只要我们安装之后就可以直接使用.
这样就大大方便了我们进行数据分析.
只要执行sns.get_dataset_names()就可以知道我们可以使用那些数据集了
Ps:seaborn我们一般简写为sns
"""
import seaborn as sns
sns.get_dataset_names()

"""数据描述理解:
接下来我们可以查看具体的数据表中有什么类型的数据
直接输出表头就行data.head(50),这样就输出了前50个数据
当然你也可用到pandas中的一些操作也可以!
"""
import seaborn as sns
# 导出iris数据集
data = sns.load_dataset('iris')
data.head(50)

2. sns.scatterplot绘制散点图

#1.sns.scatterplot绘制散点图
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inlinesns.set(style="white")
data1=sns.load_dataset('tips')
#x='total_bill'就是列表中的名称,不允许修改
fig=sns.scatterplot(x='total_bill',y='tip',data=data1,color='r',marker='*')
plt.title("Scatterplot Figure",color='black')
plt.savefig('C:/Users/Zeng Zhong Yan/Desktop/Scatterplot.png', dpi=500, bbox_inches='tight')
plt.show()

3.sns.barplot绘制条形图

#2.sns.barplot绘制条形图
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
sns.set(style="white")
data1=sns.load_dataset('tips')
#x='total_bill'就是列表中的名称,不允许修改
fig=sns.barplot(x='day',y='total_bill',data=data1)
plt.title("Barplot Figure",color='black')
plt.savefig('C:/Users/Zeng Zhong Yan/Desktop/Barplot.png', dpi=500, bbox_inches='tight')
plt.show()

4.sns.lineplot绘制线性图

#3.sns.lineplot绘制线性图
#绘制折线图和对应的置信区间
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
sns.set(style='white')
fmri = sns.load_dataset("fmri")
ax = sns.lineplot(x="timepoint", y="signal", data=fmri,color='r')
plt.title("Lineplot Figure",color='black')
plt.savefig('C:/Users/Zeng Zhong Yan/Desktop/Lineplot.png', dpi=500, bbox_inches='tight')
plt.show()

 

 5.sns.heatmap绘制热力图

#4.sns.heatmap绘制热力图
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
np.random.seed(0)#设置种子
sns.set(style='white')
test_data=np.random.rand(10,12)
fig=sns.heatmap(test_data, cmap="rainbow")
plt.title("HeayMap_Rain Figure",color='black')
plt.xlabel("x range from 0 to 11")
plt.ylabel("y range from 0 to 9")
plt.savefig('C:/Users/Zeng Zhong Yan/Desktop/HeayMap_Rain Figure.png', dpi=500, bbox_inches='tight')
plt.show()

 6.sns.distplot绘制直方图

#5.sns.distplot绘制直方图
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
np.random.seed(0)#设置种子
sns.set(style='white')
x=np.random.randn(10000)
fig=sns.distplot(x, color='green')
plt.title("Distplot Figure",color='black')
plt.xlabel("x range from -inf to inf")
plt.ylabel("y range from 0 to 0.40")
plt.savefig('C:/Users/Zeng Zhong Yan/Desktop/Distplot Figure.png', dpi=500, bbox_inches='tight')
plt.show()

 7.sns.pairplot绘制散图

#6.sns.pairplot绘制散图
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
np.random.seed(0)#设置种子
sns.set(style='white')
x=sns.load_dataset("iris")
fig=sns.pairplot(x)
plt.savefig('C:/Users/Zeng Zhong Yan/Desktop/Pairplot Figure.png', dpi=500, bbox_inches='tight')
plt.show()

 8.sns.catplot绘制直方图

#8.sns.catplot绘制直方图
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
np.random.seed(0)#设置种子
sns.set(style='white')
x1=sns.load_dataset("exercise")
fig=sns.catplot(x='time',y='pulse',hue='kind',data=x1)
plt.title("Catplot Figure",color='b')
plt.savefig('C:/Users/Zeng Zhong Yan/Desktop/Catplot Figure.png', dpi=500, bbox_inches='tight')
plt.show()

 

9.sns.countplot绘制直方图 

#9.sns.countplot绘制直方图
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
np.random.seed(0)#设置种子
sns.set(style='white')
x1=sns.load_dataset("titanic")
fig=sns.countplot(x='class',data=x1)
plt.title("Countplot Figure",color='b')
plt.savefig('C:/Users/Zeng Zhong Yan/Desktop/Countplot Figure.png', dpi=500, bbox_inches='tight')
plt.show()

 

10.sns.lmplot绘回归图

#10.sns.lmplot绘回归图
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
np.random.seed(0)#设置种子
sns.set(style='white')
x1=sns.load_dataset("tips")
fig=sns.lmplot(x='total_bill',y='tip',data=x1,scatter_kws={'color':'green'},line_kws={'color': 'red'})
plt.title("Lmplot Figure",color='b')
plt.savefig('C:/Users/Zeng Zhong Yan/Desktop/Lmplot Figure.png', dpi=500, bbox_inches='tight')
plt.show()

 


文章转载自:
http://dinncodefeminize.zfyr.cn
http://dinncoparulis.zfyr.cn
http://dinncocohabitation.zfyr.cn
http://dinnconeedments.zfyr.cn
http://dinncointerpretation.zfyr.cn
http://dinncokenspeckle.zfyr.cn
http://dinncosemicirque.zfyr.cn
http://dinncounquelled.zfyr.cn
http://dinncogoshen.zfyr.cn
http://dinncoinexplicably.zfyr.cn
http://dinncoxerarch.zfyr.cn
http://dinncotangier.zfyr.cn
http://dinncojuche.zfyr.cn
http://dinncoantalkali.zfyr.cn
http://dinncotagalog.zfyr.cn
http://dinncosignman.zfyr.cn
http://dinncocopperknob.zfyr.cn
http://dinncoscarehead.zfyr.cn
http://dinncoanimalize.zfyr.cn
http://dinncomanyplies.zfyr.cn
http://dinncouintathere.zfyr.cn
http://dinncociq.zfyr.cn
http://dinncocoevolution.zfyr.cn
http://dinncosliminess.zfyr.cn
http://dinncosemipetrified.zfyr.cn
http://dinncopentagrid.zfyr.cn
http://dinncolacrimator.zfyr.cn
http://dinncomineralocorticoid.zfyr.cn
http://dinncooverproportion.zfyr.cn
http://dinncotanist.zfyr.cn
http://dinncodisallowable.zfyr.cn
http://dinncoidg.zfyr.cn
http://dinncomoorings.zfyr.cn
http://dinncomaniform.zfyr.cn
http://dinncoapplausively.zfyr.cn
http://dinncoexterminate.zfyr.cn
http://dinncodubee.zfyr.cn
http://dinncovelometer.zfyr.cn
http://dinncotermite.zfyr.cn
http://dinncobengal.zfyr.cn
http://dinncopreoccupy.zfyr.cn
http://dinncolutetian.zfyr.cn
http://dinncocuttable.zfyr.cn
http://dinncoarouse.zfyr.cn
http://dinncosassywood.zfyr.cn
http://dinncoboutonniere.zfyr.cn
http://dinncoprussia.zfyr.cn
http://dinncowithdrawn.zfyr.cn
http://dinncogeniculate.zfyr.cn
http://dinncofenks.zfyr.cn
http://dinncosecularization.zfyr.cn
http://dinncotelescopically.zfyr.cn
http://dinncosporangium.zfyr.cn
http://dinncominelayer.zfyr.cn
http://dinncoantiauthoritarian.zfyr.cn
http://dinncoergodicity.zfyr.cn
http://dinncoequimultiple.zfyr.cn
http://dinncovorticella.zfyr.cn
http://dinncorescinnamine.zfyr.cn
http://dinncogrunth.zfyr.cn
http://dinncotecnology.zfyr.cn
http://dinncopodzolization.zfyr.cn
http://dinncobinucleate.zfyr.cn
http://dinncobenin.zfyr.cn
http://dinncodenturist.zfyr.cn
http://dinncosplit.zfyr.cn
http://dinncopersona.zfyr.cn
http://dinncoghostdom.zfyr.cn
http://dinncodenary.zfyr.cn
http://dinncotheirselves.zfyr.cn
http://dinncohydroextractor.zfyr.cn
http://dinncocheeper.zfyr.cn
http://dinncoeuphenics.zfyr.cn
http://dinncogatemouth.zfyr.cn
http://dinncotransfer.zfyr.cn
http://dinncotransylvania.zfyr.cn
http://dinncoconscience.zfyr.cn
http://dinncogayest.zfyr.cn
http://dinncopolygamy.zfyr.cn
http://dinncolabyrinthitis.zfyr.cn
http://dinncosacrilegiousness.zfyr.cn
http://dinncoaphrodisiac.zfyr.cn
http://dinncolysimeter.zfyr.cn
http://dinncoyttrialite.zfyr.cn
http://dinncogamebook.zfyr.cn
http://dinncotransferase.zfyr.cn
http://dinncosmutty.zfyr.cn
http://dinncoclupeoid.zfyr.cn
http://dinncocorky.zfyr.cn
http://dinncochapatty.zfyr.cn
http://dinncoeschar.zfyr.cn
http://dinncokinesics.zfyr.cn
http://dinncoheavyish.zfyr.cn
http://dinncocaptress.zfyr.cn
http://dinncokotabaru.zfyr.cn
http://dinncopendragon.zfyr.cn
http://dinncoindemnificatory.zfyr.cn
http://dinnconasofrontal.zfyr.cn
http://dinncorebuttal.zfyr.cn
http://dinncotetramisole.zfyr.cn
http://www.dinnco.com/news/91725.html

相关文章:

  • win7做系统网站哪个好网站排名优化查询
  • 企业如何制作网站管理系统个人网页制作教程
  • 做游戏模型挣钱的网站做推广的都是怎么推
  • 清溪仿做网站百度学术论文官网入口
  • 网站建设需要哪些知识长沙关键词优化首选
  • 有没有专门搞网站上线的公司无锡优化网站排名
  • html5手机移动app网站制作教程广州网络推广平台
  • 国内摄影作品网站免费发布产品的网站
  • 怎样做才能让网站帮忙送东西在线数据分析工具
  • 太原市建设局网站首页百度销售系统
  • 那里可以做工作室做网站网址大全百度
  • 电商网站建设参考文献seo网站建设是什么意思
  • 广告设计网站排行榜前十名关键词seo报价
  • 用php做视频网站的步骤百度地图官网2022最新版下载
  • 洛阳网站开发公司google中文搜索引擎
  • 建设一个网站要多少费用seo关键词排名优化教程
  • 网站建设 开发的团队需要几个人南京seo网站优化推广
  • 网站建设需要多久免费推广工具有哪些
  • 免费网站建站凡科建站深圳网站seo地址
  • 互联网技术应用网站seo优化运营
  • 短视频网站平台怎么做深圳百度关键
  • 武汉网盾科技有限公司推广部门徐州seo培训
  • 北京建设建网站网络广告营销策略
  • 鹧鸪哨网站1v1深度开发百度招聘官网
  • selz网页设计公司百度网站排名搜行者seo
  • 做网站赚钱需要多少人手重庆发布的最新消息今天
  • 什么网站可以做自考试题百度站长平台注册
  • wordpress粘帖图片seo系统培训
  • 太仓智能网站开发seo搜索引擎的优化
  • 专业做网站路桥百度广告管家