Aplpy multiplot dynamic axis sharing

折月煮酒 提交于 2019-11-30 16:00:13

It seems that the plotting functionality of aplpy is completely based on matplotlib. So any plot formatting that can be done with aplpy can in one way or the other be done with matplotlib.

But if you still want to stick to aplpy for creating the plots, there should still be a solution which does not need complicated event listeners.

Unfortunately, unlike plotting functionalities of other libraries, aplpy seems to only accept the figure as argument, not the axes.

It should nonetheless be possible to link the axes even after their creation:

axes = fig.get_axes()
axes[0].get_shared_x_axes().join(axes[0], axes[1])
axes[0].get_shared_y_axes().join(axes[0], axes[1])
axes[0].autoscale() # <-- needed if no axes limits are explicitely set.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!