Home > Software design >  Specifying steps in y-axis of Pandas plot()
Specifying steps in y-axis of Pandas plot()

Time:11-14

I use the following plot function to create a line chart of a Pandas dataframe

row = df.iloc[0].astype(int)
plt.subplot(1, 2, 1)
row.plot(marker='o', fontsize=20, ylabel=yax_label)
plt.show()

Problem is that, the y steps are shown in float (0.5 steps). Is there any way to control that? For example, 3,4,5,6,7 as integers.

enter image description here

CodePudding user response:

You can use enter image description here

  • Related