Seaborn Code Explained | ||
So the graph is created with mostly one line of code. Here the graph is a graph that does a linear lmplot regression from the x and y data that are in the df dataframe. In addition, we can see that not one but 4 graphs have been created at once. There is often the possibility of creating such grids (facetgrids). In fact, this is the case as soon as a function has the row and col parameters. Here the row parameter is not used, in order not to have 4 graphs on the same line we chose to refer to the row from 2 graphs. Of course, the "dataset" field here must be a qualitative variable. hue is a color parameter, this means for a qualitative variable that each of its modalities will be displayed in a different color. Other parameters can be used: linestyle: in line charts size: the size of points in a point cloud or the thickness of a curve. The last parameters are color formatting parameters (palette), error bar (ci), grid (height in inches), and parameters (keywords) passed to a lower level function ( scatter_kws).
![]()
|