Seaborn简介
定义
Seaborn是一个基于matplotlib且数据结构与pandas统一的统计图制作库。Seaborn框架旨在以数据可视化为中心来挖掘与理解数据。...提供显示条件
%matplotlib inline #在Jupyter中正常显示图形
导入数据
#Seaborn内置数据集导入
dataset = sns.load_dataset('dataset...if x<5 else('一般' if x<15 else '较难')) #增加难度字段
df = df[['菜谱','用料','用料数','难度','菜系','评分','用户']] #选择需要的列...#设置rug参数,可添加观测数值的边际毛毯
fig,axes=plt.subplots(1,2,figsize=(10,6)) #为方便对比,创建一个1行2列的画布,figsize设置画布大小
sns.distplot...条形图
常规条形图:barplot
#语法
'''
seaborn.barplot(x=None, y=None, hue=None, data=None, order=None,
hue_order=