Reputation: 2861
I have DataFrame that looks like this
I want to plot it:
df2[['width', 'height', 'depth']].head(20).plot.bar(figsize=(8, 8), fontsize=16)
Works great, but there I need increase amount of points of Y axis. I want to add numbers like 2400, 1900, etc. How can I do that? Why is there only 6 points on Y axis ?
Upvotes: 1
Views: 5515
Reputation: 7967
Okay so you only need to pass in the yticks
argument. yticks
is not a direct argument for bar
but it passed on to plot
.
df2[['width', 'height', 'depth']].head(20).plot.bar(figsize=(8, 8), fontsize=16, yticks = range(0,2600,200))
plt.show()
Result:
You can also use xticks
if you want to do the same for the x-axis
Upvotes: 6