How do I get the x-axis values of [a, b, c] to show up?
import pandas as pd import matplotlib.pyplot as plt s = pd.Series([1, 2, 10], index=['a', 'b', 'c']) s.plot() plt.show()
You can get your xtick labels to show using plt.xticks:
plt.xticks
import pandas as pd import matplotlib.pyplot as plt s = pd.Series([1, 2, 10], index=['a', 'b', 'c']) s.plot() plt.xticks(np.arange(len(s.index)), s.index) plt.show()
Output:
1.4m articles
1.4m replys
5 comments
57.0k users