
pandas绘制多图多标题
发布日期:2021-05-08 05:03:31
浏览次数:23
分类:原创文章
本文共 1393 字,大约阅读时间需要 4 分钟。
import numpy as np import pandas as pdimport seaborn as sns import matplotlib.pyplot as plt sns.set( palette="muted", color_codes=True) #rs = np.random.RandomState(10) #d = rs.normal(size=100) d = pd.read_csv('c:/Users/MaiBenBen/Desktop/kde/nicetable.csv',encoding='gbk')#d = pd.read_csv('nicetable.csv')#d.sorted_values('Area',inplace=True,ascending=True) #d = pd.read_csv('c:\Users\MaiBenBen\Desktop\nicetable.csv',usecols=['Area'],encoding='gbk')#d.loc[:,'Area']#sns.distplot(d.loc['Area']f, axes = plt.subplots(3, 2, figsize=(7, 7), sharex=True) sns.distplot(d.loc[:,'Diameter'], kde=False, color="b", ax=axes[0, 0]) plt.title('Density Plot of Rock Fragmentation', fontsize=22)#sns.distplot(d.loc[:,'Area'], hist=False, rug=True, color="r", ax=axes[0, 1]) sns.distplot(d.loc[:,'Diameter'], hist=False, color="g", kde_kws={"shade": True}, ax=axes[0, 1]) sns.distplot(d.loc[:,'Diameter'], color="m", ax=axes[1, 0]) sns.kdeplot(d.loc[:,'Diameter'],cumulative=True, ax=axes[1, 1])sns.distplot(d.loc[:,'Diameter'], color="m", ax=axes[2, 0]) sns.kdeplot(d.loc[:,'Diameter'],cumulative=True, ax=axes[2, 1])# Decorationplt.suptitle('Density Plot of City Mileage by Vehicle Type', fontsize=22)axes[0,0].set_title('333')axes[0,1].set_title('4444')axes[1,0].set_title('55555')axes[1,1].set_title('666666')axes[2,0].set_title('7777777')axes[2,1].set_title('88888888')plt.legend()plt.show()
发表评论
最新留言
网站不错 人气很旺了 加油
[***.192.178.218]2025年04月14日 16时07分00秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
使用QT实现一个简单的登陆对话框(纯代码实现C++)
2019-03-05
QT :warning LNK4042: 对象被多次指定;已忽略多余的指定
2019-03-05
GLFW 源码 下载-编译-使用/GLAD配置
2019-03-05
针对单个网站的渗透思路
2019-03-05
Typescript 学习笔记六:接口
2019-03-05
【ASP.NET】ASP.NET中权限验证使用OnAuthorization实现
2019-03-05
02、MySQL—数据库基本操作
2019-03-05
OpenJDK1.8.0 源码解析————HashMap的实现(一)
2019-03-05
MySQL-时区导致的时间前后端不一致
2019-03-05
2021-04-05阅读小笔记:局部性原理
2019-03-05
go语言简单介绍,增强了解
2019-03-05
python file文件操作--内置对象open
2019-03-05
架构师入门:搭建基本的Eureka架构(从项目里抽取)
2019-03-05
MongoDB 快速扫盲贴
2019-03-05
修复搜狗、360等浏览器不识别SameSite=None 引起的单点登录故障
2019-03-05
EXTJS4.2——10.Tab+Iframe
2019-03-05
WEB基础——AJAX
2019-03-05
one + two = 3
2019-03-05
sctf_2019_easy_heap
2019-03-06