如何调整海洋线路平板的色调,而不将其连接到下次显示该类别时?
我希望为我的 seaborn 线图添加色调,但是以下情况不断发生,如图所示。
我的代码如下:
plt.figure(figsize=(15,5))
sns.lineplot(x = 'DATETIME', y = 'TOTALDEMAND', data = df_day.loc[df_day['STATE'] == 'NSW'],hue="Season")
有没有办法让色调不连接到下一季?
I wish to add a hue to my seaborn lineplot, however the following keeps happening, as shown in the image.
My code is as follows:
plt.figure(figsize=(15,5))
sns.lineplot(x = 'DATETIME', y = 'TOTALDEMAND', data = df_day.loc[df_day['STATE'] == 'NSW'],hue="Season")
Is there a way to have the hue not connect to the next season?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一个想法可能是使用固定颜色绘制线图,并使用散点图进行着色:
An idea could be to draw the lineplot with a fixed color, and use a scatterplot for colorizing: