I have six data arrays (data1
, data2
, data3
, data4
, data5
and data6
) in my code. An example of an array that I have is below. I would like to increase the hspace
after fourth heatmap subplot (see desired image) and plot only one cbar
. How can I do them?
data1 = np.array([[2.25, 9.65],
[-1.05, -1.50]])
Related part of my code:
values = [data1, data2, data3, data4, data5, data6]
num = [1, 2, 3, 4, 5, 6]
for value, i in zip (values, num):
ax = plt.subplot(3, 2, i)
im, cbar = heatmap(value, x, y, ax=ax, cmap="RdBu", cbarlabel="Temperature", vmin=-2, vmax=20)
plt.subplots_adjust(left=None, bottom=None, right=None, top=None, wspace=0.1, hspace=0.1)
Desired image: