首页 > 解决方案 > 无法在 Seaborn 中获得虚线

问题描述

我正在尝试在 Databricks 中的同一图中绘制两个线图,我想将其中一条线设为虚线。

我试过了

#plot total fed and total programmed
  sns.lineplot(data = data, x = "timestamp", y="total_programmed",  linestyle='dashed',  ax=axes[0], label="A")
  sns.lineplot(data = data, x = "timestamp", y="total_fed", color = "darkgreen", ax=axes[0], label="B")

两条线都保持实线。我也尝试了“--”及其变体,但结果保持不变。还有哪些其他选择?

在此处输入图像描述

标签: pythonplotseaborn

解决方案


推荐阅读