[英]How to change the line color in seaborn lmplot
您可以使用line_kws
和scatter_kws
將參數作為鍵值對(字典)提供給底層plt.plot
和plt.scatter
函數。 所以像line_kws = {'color': 'red'}
應該做的工作:
g = sns.lmplot(x="total_bill", y="tip",
data=tips, line_kws={'color': 'red'})
sns.plt.show()
這是圖例項文檔中推薦的方法
g = sns.lmplot(x="total_bill", y="tip", hue="smoker", data=tips,
palette=dict(Yes="g", No="m"))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.