python 散点图_Python画散点图之seaborn

import seaborn as snsimport matplotlib.pyplot as pltdf = sns.load_dataset('iris') p1=sns.regplot(x=df["sepal_length"], y=df["sepal_width"])plt.show() # 保存图片fig = p1.get_figure()fig.set_size_inches(4.8, 4.8)fig.savefig('PNG/#40_Scatterplot_with_regression_fit_seaborn.png')

38053e005aa4f7426ad458d6ee8ff90d.png

import seaborn as snsimport matplotlib.pyplot as pltdf = sns.load_dataset('iris') p2=sns.regplot(x=df["sepal_length"], y=df["sepal_width"], fit_reg=False)plt.show()

3fef44ca5df8583e109aff52859552ed.png

import seaborn as snsimport matplotlib.pyplot as pltdf = sns.load_dataset('iris') p1=sns.regplot(x=df["sepal_length"], y=df["sepal_width"], marker="+", fit_reg=False)plt.show()

10766b6cc7a81d30ea9fdaec0ffa4aa3.png

import seaborn as snsimport matplotlib.pyplot as pltimport numpy as np df = sns.load_dataset('iris')p1=sns.regplot(x=df["sepal_length"], y=df["sepal_width"], marker=3, fit_re
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值