I want plot a bar plot using the following code
num_trade.plot.bar()
where num_trade
is a pandas.Series
object. This is the result
the xtick labels are crowded, how can make it more sparse to make the labels more visible?
I want plot a bar plot using the following code
num_trade.plot.bar()
where num_trade
is a pandas.Series
object. This is the result
the xtick labels are crowded, how can make it more sparse to make the labels more visible?
Assuming that the x-axis is time series data, an easy way to achieve this is to use the following settings, which will take care of it automatically
locator = mdates.AutoDateLocator()
formatter = mdates.ConciseDateFormatter(locator)
ax.xaxis.set_major_locator(locator)
ax.xaxis.set_major_formatter(formatter)