我有一个二乘二的情节,我正在创建动态。在第一行我想绘制密度函数,在第二行CDFs。我想要
也就是说,垂直对齐的两个对象具有相同的x轴,水平对齐的两个绘图具有相同的y轴。
但是,sharex
和sharey
会强制所有子块都是相同的。我怎样才能修复这种轴共享?我知道我可以手动为每个axes分配一个共享伙伴,但这不适用于以下通用结构:
fig, axes = plt.subplots(nrows=2, ncols=2, sharex=True)
for i, lam in enumerate(lams):
axesNow = [axs[i] for axs in axes] # pick the ith column from axes
for i, Param.p in enumerate(pp):
axesNow[0].plot(somethingWithPDF)
axesNow[1].plot(somethingWithCDF)
for ax in axes.flatten(): ax.legend()
目前没有回答
相关问题 更多 >
编程相关推荐