O'Reilly logo

Matplotlib for Python Developers by Allen Yu, Claire Chung, Aldrin Yim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Seaborn to simplify visualization tasks

The scatter plot is one of the most common plots in the scientific and business worlds. It is particularly useful for displaying the relationship between two variables. While we can simply use matplotlib.pyplot.scatter to draw a scatterplot (see Chapter 2Getting Started with Matplotlib, and Chapter 4, Advanced Matplotlib, for more details), we can also use Seaborn to build similar plots with more advanced features.

The two functions, seaborn.regplot() and seaborn.lmplot(), display a linear relationship in the form of a scatter plot, a regression line, and the 95% confidence interval around the regression line. The main difference between the two functions is that lmplot() combines regplot() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required