如何使用Gridspec为所有子图绘制一个颜色条?

时间:2019-04-19 18:48:16

标签: python matplotlib colorbar

我正在为我拥有的所有子图绘制单个颜色条(范围:0,最大值)。我在这里Matplotlib 2 Subplots, 1 Colorbar尝试过解决方案,但是它们需要使用我没有使用的plt.subplots。

这是我当前的代码,其中显示3个单独的颜色条。

"foo"      // ok
"foo"bar"  // not ok, interpreted as `"foo"` followed by `bar"`, syntax error
"foo\"bar" // ok because the second `"` is escaped, i.e. does not 
           // signify the end of the string literal

我认为我确实需要在这里使用Gridspec,因为我需要按如下方式显示我的数据:

3 graphs

0 个答案:

没有答案