The lineplot (lmplot) is one of the most basic plots. It shows a line on a 2 dimensional plane. You can plot it with seaborn or matlotlib depending on your preference.
The examples below use seaborn to create the plots, but matplotlib to show. Seaborn by default includes all kinds of data sets, which we use to plot the data.
Related course: Matplotlib Examples and Video Course
line plots
lmplot
The lmplot plot shows the line along with datapoints on the 2d space. By specifying x and y you can set the horizontal and vertical labels repsectively.
1 | import seaborn as sns |
line plot
The plot below shows different types of line plots. They can be any color you’d like. We use a dataset included in seaborn, but this would work with any kind of data.
1 | import seaborn as sns |
If you are new to matplotlib, then I highly recommend this course.