0
我一直在想这个永远:当我使用plt.subplot(221)(例如)命令时,如何在Matplotlib中设置图形来共享坐标轴?与其说:Matplotlib与plyplot.subplot()命令共享坐标轴?
fig, axes = plt.suplots(2,2,sharex=True, sharey=True)
我想说:
plt.subplot(221, sharex=True, sharey=True)
,这样我就不必处理与plt.subplots回报这恼人的阵列,但显然这是行不通。
有没有办法做到这一点只是使用subplot()命令? – 2015-04-04 17:36:26
我不确定,我不知道一种方法。然而在我看来,'subplots'命令会产生更简洁的代码。如果你有这么多的subplots元组解开变得不可读,我发现'axes [2,2] .plot(...)比'plt.subplot(221,sharex = True,sharey = True)好'' – cel 2015-04-05 06:34:23