Show confidence limits and prediction limits in scatter plot

前端 未结 3 618
温柔的废话
温柔的废话 2020-12-01 03:27

I have two arrays of data as hight and weight:

import numpy as np, matplotlib.pyplot as plt

heights = np.array([50,52,53,54,58,60,62,64,66,67,68,70,72,74,76         


        
3条回答
  •  庸人自扰
    2020-12-01 03:33

    You can use seaborn plotting library to create plots as you want.

    In [18]: import seaborn as sns
    
    In [19]: heights = np.array([50,52,53,54,58,60,62,64,66,67, 68,70,72,74,76,55,50,45,65])
        ...: weights = np.array([25,50,55,75,80,85,50,65,85,55,45,45,50,75,95,65,50,40,45])
        ...: 
    
    In [20]: sns.regplot(heights,weights, color ='blue')
    Out[20]: 
    

    enter image description here

提交回复
热议问题