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()  

 

 

上一篇:Imagepy图像处理框架中neighbors函数的探索之旅
下一篇:imagepy出现TypeError: \'int\' object is not iterable错误的解决过程

发表评论

最新留言

网站不错 人气很旺了 加油
[***.192.178.218]2025年04月14日 16时07分00秒