Skip to content

Instantly share code, notes, and snippets.

@parulnith
Last active May 3, 2021 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parulnith/47e5a2134ad74c2688a6fb7f6e187a3e to your computer and use it in GitHub Desktop.
Save parulnith/47e5a2134ad74c2688a6fb7f6e187a3e to your computer and use it in GitHub Desktop.
sns.lmplot(x = 'culmen_length_mm',y = 'culmen_depth_mm', data = df);
# For calculating correlation coefficient and superimposing on the plot
r = stats.pearsonr(df['culmen_length_mm'], df['culmen_depth_mm'])[0]
ax = plt.gca()
ax.text(.03, 1, 'r={:.3f}'.format(r),
transform=ax.transAxes)
#Displaying the plot
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment