python - Python matplotlib subplot 笨拙的日期时间 xticks 问题
问题描述
我有共享 x,y 轴的子图。x 轴是日期时间戳。一切看起来都很好。问题是 x 轴看起来很笨拙。
我的代码:
fig, ax = plt.subplots(nrows=rows, ncols=cols,sharey=True,sharex=True)
fig.subplots_adjust(hspace=0.025, wspace=0.05)
for i in range(rows):
for j in range(cols):
#### plot data goes here.
ax[i,j].autofmt_xdate()
ax[i,j].xaxis.set_tick_params(rotation = 30)
fig.subplots_adjust(right=0.95)
plt.show()
当前输出:x 轴标签看起来很笨拙,难以阅读。
解决方案
推荐阅读
- python - 如何修改子进程的 Python 路径
- ruby - 我自定义的每个方法的结果都是在 ruby 中产生 nil
- javascript - 我无法使用 codeigniter 在 ajax 中获取数据 ID(动态 HTML。在最后一个左侧位置)
- postgresql - 将多个 CSV 文件复制到具有递增 id 的 postgres
- javascript - 从链接 javascript 下载数据
- amazon-web-services - 无服务应用程序部署失败 - 启用细粒度访问控制或将限制性访问策略应用于您的域
- python - 如何创建一个充满空列表的新 numpy 数组?
- javascript - 错误:“动作”未从“历史”导出
- javascript - JS:对象的聚合数组
- c# - RandomAccessStream.CopyAndCloseAsync 需要互联网吗?