matplotlib colorbar in each subplot

后端 未结 5 1043
一生所求
一生所求 2020-11-30 05:33

I would like to add a separate colorbar to each subplot in a 2x2 plot.

fig , ( (ax1,ax2) , (ax3,ax4)) = plt.subplots(2, 2,sharex = True,sharey=True)
z1_plot          


        
5条回答
  •  暖寄归人
    2020-11-30 06:18

    In plt.colorbar(z1_plot,cax=ax1), use ax= instead of cax=, i.e. plt.colorbar(z1_plot,ax=ax1)

提交回复
热议问题