2016-12-29 10 views
1

データ値:シリーズのプロットシリーズにY軸を設定するには、

type(today_slice.Last) 
pandas.core.series.Series 

today_slice.Last.head(5) 
Timestamp 
2016-12-29 02:00:00 164.45 
2016-12-29 02:03:00 164.42 
2016-12-29 02:06:00 164.40 
2016-12-29 02:09:00 164.41 
2016-12-29 02:12:00 164.41 
Name: Last, dtype: float64 

プロット:y軸は、などなど形式164.42で値を表示されない原因を

はあなたが私に教えてくださいすることができシリーズの値ごとに?

today_slice.Last.plot(yticks=today_slice.Last) 

enter image description here

答えて

2

これはトリックを行う必要があります。軸チックの書式を設定する必要があります。

from matplotlib.ticker import FormatStrFormatter 

ax = today_slice.Last.plot() 
ax.yaxis.set_major_formatter(FormatStrFormatter('%.2f')) 
+0

いいね、これを修正しました。ありがとう:-) – ade1e

関連する問題