equivalent of geom smooth function in python using plotline lib 1

equivalent of geom smooth function in python using plotline lib

(
    ggplot(mpg, aes(x='displ', y='hwy'))
    + geom_point()
    + geom_smooth()
    + labs(x='displacement', y='horsepower')
)

Here is what the above code is Doing:
1. We’re creating a plot object using ggplot() and passing in the mpg dataset.
2. We’re adding a geom_point() layer to the plot object.
3. We’re adding a geom_smooth() layer to the plot object.
4. We’re adding labels to the x and y axes.
5. We’re printing the plot object.

Similar Posts