Here is the explanation of the code.
This is the first plot:
- R, p = pearsonr(wine_quality['fixed acidity'], wine_quality.pH) computes R and p values for the given data distribution. R2 and p values indicate the quality of the fit to the data.
- g1=sns.regplot() plots the regression curve along with a scatter plot of the original data points:
- truncate=True specifies to fit the curve only till the available data points. The default is to extend it to both ends of the axes.
- ci=99 specifies to plot a 99% confidence interval around the linear curve.
- marker='D' plots the points in a diamond shape, instead of the default circles.
- scatter_kws={'color': 'r'} is the scatter plot keyword dictionary with properties to be used. Plot the ...