更新时间:2023-11-23 23:49:04
ax.fmt_xdata
是日期格式,通常仅用于交互式绘图中的悬停功能.
ax.fmt_xdata
is the formatter for the dates usually only used for the hover functionality in interactive plots.
您要在此处将xaxis的主要格式化程序设置为 DateFormatter
:
What you want here is to set the major formatter of the xaxis to a DateFormatter
:
ax.xaxis.set_major_formatter(DateFormatter('%b-%d-%Y'))