Last active
May 3, 2021 05:09
-
-
Save parulnith/47e5a2134ad74c2688a6fb7f6e187a3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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