16
GridSpec
の一般的な使い方を扱った投稿がいくつかあります(example)。`subplots()`で `GridSpec()`を使う方法
gs = gridspec.GridSpec(4, 1, height_ratios=[2, 2, 1, 1])
tPlot, axes = plt.subplots(4, sharex=True, sharey=False)
tPlot.suptitle(node, fontsize=20)
axes[0].plot(targetDay[0], gs[0])
axes[1].plot(targetDay[1], gs[1])
axes[2].scatter(targetDay[2], gs[2])
axes[3].plot(targetDay[3], gs[3])
言うまでもなくへ: 私は無駄に達成しようとしています何を、私はいくつかのループ制御指標と実際の配列やリストのインデックスを置き換えることができsubplots
、このようなもの、とGridSpec
の使用を可能にすることですこのコードはうまくいかない、と言います。