Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
236 views
in Technique[技术] by (71.8m points)

python - Mean line in plot

I have some plot with sale bike on prefer country. It looks like this: enter image description here

This is my code:

plot12.groupby(['Country','Year']).sum().reset_index()
ax = sn.barplot(x="Year", y="count", hue="Country", data=plot12)
mean = count.mean()
plt.axvline(mean, color='r', linestyle='--')
plt.title('Sprzeda? rowerów w wybranych Państwach')

I would like to put a mean line and next median line, but I get an error:

NameError: name 'count' is not defined

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...