Python Matplotlib: how to reduce number of x tick marks for non-numeric tyoe
问题 I have this very simple pandas dataframe here and i'm trying to plot the index column (Date, which is formatted as string) against 'Adj Close' Column . Adj Close Date 2010-01-01 1.438994 2010-01-04 1.442398 2010-01-05 1.436596 2010-01-06 1.440403 2010-01-07 1.431803 ... a lot more rows Here's my very simple code: import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot(df['Adj Close'], label='Close Price History') fig.autofmt_xdate() however the graph is unpleasant in the sense that