我已经能够使用优秀的教程进行画笔/缩放: https://bl.ocks.org/mbostock/34f08d5e11952a80609169b7917d4172
我正在使用以下比例和轴变量:
import matplotlib.pyplot as plt
from matplotlib.dates import DayLocator, MonthLocator, DateFormatter
fig, ax = plt.subplots(1,1)
ax.plot(df)
ax.xaxis.set_major_locator(MonthLocator())
ax.xaxis.set_major_formatter(DateFormatter('%Y-%m-%d'))
ax.xaxis.set_minor_locator(DayLocator([11,21]))
ax.xaxis.set_minor_formatter(DateFormatter('%Y-%m-%d'))
plt.setp(ax.xaxis.get_ticklabels(which='both'), rotation=70)
fig.tight_layout()
plt.show()
如何设置刻度线的最大数量,但将最精细的刻度限制为一天?