#42 Custom linear regression fit | seaborn




You can custom the appearance of the regression fit proposed by seaborn.

In this example, color, transparency and width are controlled through the line_kws={} option.







# library & dataset
import seaborn as sns
df = sns.load_dataset('iris')

# plot
sns.regplot(x=df["sepal_length"], y=df["sepal_width"], line_kws={"color":"r","alpha":0.7,"lw":5})


  • Sponsors


    Leave a Reply

    Your email address will not be published.