16
有几个(example)SO帖子处理如何使用GridSpec
一般subplotting。 什么,我试图实现无果,是允许使用的GridSpec
与subplots
,这样的事情,在那里我可以与一些循环控制指标代替实际的数组和列表索引:如何使用`GridSpec()`与`subplots()`
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])
不用说这个代码不起作用,它只是一个例子。