Facetting multiple regressions
lmplot() allows us to facet the data across multiple rows and columns.
In the previous plot, the multiple lines were difficult to read in one
plot. We can try creating multiple plots by Region to see if that is
a more useful visualization.
Bu egzersiz
Intermediate Data Visualization with Seaborn
kursunun bir parçasıdırEgzersiz talimatları
- Use
lmplot()to look at the relationship betweeninsurance_lossesandpremiums. - Create a plot for each
Regionof the country. - Display the plots across multiple rows.
Uygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
# Create a regression plot with multiple rows
sns.lmplot(data=df,
x="insurance_losses",
y="premiums",
____="____")
# Show the plot
plt.show()