plt.subplots sharex,sharey,我设置投影后不再工作

发布于 2025-02-04 03:43:51 字数 664 浏览 4 评论 0原文

fig, ax=plt.subplots(6, 4,figsize=(14, 14), sharex=True, sharey=True, subplot_kw=dict(projection=fwcs[:,1,1]), gridspec_kw={'hspace': 0.5, 'wspace': 0.3})

这就是我创建轴以沿数据中不同视线绘制24个图的轴的方式。看到我有sharex = true and sharey = true。但是,这就是我的数字的样子:

不起作用,轴未共享:

,如果我删除位subplot_kw = dict(propjective = fwcs [:,1,1]) 然后sharex和sharey的表现如预期:

fig, ax=plt.subplots(6, 4,figsize=(14, 14), sharex=True, sharey=True, subplot_kw=dict(projection=fwcs[:,1,1]), gridspec_kw={'hspace': 0.5, 'wspace': 0.3})

This is how I'm creating my axes to plot 24 plots along different line of sights in my data. See that I have sharex=True and sharey=True in there. However, this is what my figure looks like:

not working, axes not shared:
not working, axes not shared

However, if I remove the bit subplot_kw=dict(projection=fwcs[:,1,1])
then sharex and sharey behave as expected:

working, but axes are now incorrect

Why is the addition of the bit setting the projection correct stopping the sharex and sharey?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文