小编win*_*ker的帖子

Pyplot:鼠标悬停时显示标签值

我有一个非常基本的绘图,我想添加当鼠标悬停在绘图上的数据点上时显示值的功能。

我用来创建折线图的代码如下:

df_all['count'] = pd.to_numeric(df_all['count'])
cumulative = df_all['count'].cumsum()
cumulative.plot()

plt.plot()

print(plt.show())
Run Code Online (Sandbox Code Playgroud)

提前谢谢了

python plot matplotlib python-3.x

5
推荐指数
1
解决办法
4462
查看次数

标签 统计

matplotlib ×1

plot ×1

python ×1

python-3.x ×1