如何在Seaborn中绘制连接条形图顶部的线

时间:2020-06-11 19:46:38

标签: python matplotlib seaborn

我有一个分组的条形图,想要将条形的顶部与一种趋势线链接起来。

在图片上,我组合了一个点状图和一个点状图,但是并没有达到预期的效果。

ax_line = fig_line.subplots()

ax_line = sns.barplot(x="Number of Agents", y="Duration",data=df, palette="Set1", ci=None, hue="Szenario")
ax_line = sns.pointplot(x="Anzahl Agenten", y="self.total_duration",hue="Szenario", data=df,palette="Set1", ci=None)


ax_line.set_ylabel("Duration",fontsize=15)
ax_line.set_xlabel("Number of Agents", fontsize=15)

enter image description here

有人知道吗?不幸的是,我仍然是该领域的初学者:D

0 个答案:

没有答案