matplotlib画图报错This figure includes Axes that are not compatible with tight_layout, so results might ...

当使用matplotlib进行大数据量绘图时,出现坐标轴丢失、坐标挤压的错误。错误提示为'This figure includes Axes that are not compatible with tight_layout...',原因在于未设置画布和子图。解决方法是正确配置画布和子图参数。" 124351170,13388380,RocketMQ msgId与offsetMsgId解析:全局唯一ID与偏移量揭秘,"['Java', '消息队列', 'RocketMQ', '中间件']
摘要由CSDN通过智能技术生成

之前用以下代码将实验结果用matplotlib show出来

plt.plot(np.arange(len(aver_reward_list)), aver_reward_list)
plt.ylabel('Average Reward')
plt.xlabel('Episode')
plt.tight_layout()
plt.savefig("AverageReward.eps") 
plt.show()

画出的图都没什么问题,但忽然有一次数据量比较大,matplotlib开始报错,并且画出的图出现以下问题:

报错:

D:\softwares\coding\Python\Python3.6\lib\site-packages\matplotlib\figure.py:2359: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  warnings.warn("This figure includes Axes that are not compatible "
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值