matplotlib X轴日期倾斜位置调整(双Y轴)
如果使用了to_datetime方法设置labels日期会自动倾斜。
双Y轴时,xtick设置rotation是不起作用的。
需要使用autofmt_xdate方法。
例子
fig X轴坐标为正且居中。
fig.autofmt_xdate(rotation=0,ha='center')
如果使用了to_datetime方法设置labels日期会自动倾斜。
双Y轴时,xtick设置rotation是不起作用的。
需要使用autofmt_xdate方法。
例子
fig X轴坐标为正且居中。
fig.autofmt_xdate(rotation=0,ha='center')