Travel Tips
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
线性关系数据可视化 lmplot()
lmplot()
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns %matplotlib inline sns.set_style("darkgrid") sns.set_context("paper") # 设置风格、尺度 import warnings warnings.filterwarnings('ignore') # 不发出警告
tips = sns.load_dataset("tips") print(tips.head()) # 加载数据
sns.lmplot(x="total_bill", y="tip", hue = 'smoker',data=tips,palette="Set1", ci = 70, # 误差值 size = 5, # 图表大小 markers = ['+','o'], # 点样式 )
sns.lmplot(x="total_bill", y="tip", col="smoker", data=tips)
sns.lmplot(x="size", y="total_bill", hue="smoker", col="day",data=tips, aspect=0.6, # 长宽比 x_jitter=.30, # 给x或者y轴随机增加噪音点 col_wrap=4, # 每行的列数 )
sns.lmplot(x="total_bill", y="tip", row="sex", col="time",data=tips, size=4) # 行为sex字段,列为time字段 # x轴total_bill, y轴tip
sns.lmplot(x="total_bill", y="tip",data=tips, order = 4) # 二次方进行回归
Sed ac lorem felis. Ut in odio lorem. Quisque magna dui, maximus ut commodo sed, vestibulum ac nibh. Aenean a tortor in sem tempus auctor
December 4, 2020 at 3:12 pm
Sed ac lorem felis. Ut in odio lorem. Quisque magna dui, maximus ut commodo sed, vestibulum ac nibh. Aenean a tortor in sem tempus auctor
December 4, 2020 at 3:12 pm
Donec in ullamcorper quam. Aenean vel nibh eu magna gravida fermentum. Praesent eget nisi pulvinar, sollicitudin eros vitae, tristique odio.
December 4, 2020 at 3:12 pm
我是 s enim interduante quis metus. Duis porta ornare nulla ut bibendum
Rosie
6 minutes ago