Reputation: 584
I have a dataframe which contains 18 rows and 4 columns. Now I would to plot it and use its index as xticks, so I do the following:
ax0 = dfVariableImportance.plot()
ax0.set_xticklabels(dfVariableImportance.index.tolist(), rotation='vertical', visible=True)
plt.show()
It turns out that some xticks are hidden automatically: there should be 18 xticks, but only 9 of them are shown (seems to be hidden automatically).
How can I show all the 18 xticks?
Upvotes: 1
Views: 1391
Reputation: 8493
You should be able to do this in dataframe.plot()
dfVariableImportance.plot(xticks=dfVariableImportance.index)
Upvotes: 1