12

Seaborn library in python suggests to use either lmplot or regplot to visualise a regression between two variables. What is the difference between the two plots ? The result I was able to get are slightly different but I have no idea why !

Rishabh Sharma
  • 659
  • 2
  • 8
  • 18

1 Answers1

9

regplot() performs a simple linear regression model fit and plot. lmplot() combines regplot() and FacetGrid.

The FacetGrid class helps in visualizing the distribution of one variable as well as the relationship between multiple variables separately within subsets of your dataset using multiple panels.

lmplot() is more computationally intensive and is intended as a convenient interface to fit regression models across conditional subsets of a dataset.

You can research this comparison for yourself in the seaborn docs for regplot(), lmplot(), and FacetGrid to see which function will meet your needs.