I have a code like below and I want to get a combined array made by multiple pcolormesh. How can I do this? mesh.get_array() does not return what I want (i.e., 25x10 array) but a single 5x5 array.
import matplotlib.pyplot as plt
import numpy as np
def add_randam_data(ax, h, w):
D = np.random.uniform(0, 100, size=(5, 5))
mesh = ax.pcolormesh(np.arange(D.shape[0]+1)+w*D.shape[0], np.arange(D.shape[1]+1)+h*D.shape[1], D)
return mesh
fig, ax = plt.subplots(1,1, figsize=(10, 5))
for ih in range(0,2):
for iw in range(0,5):
mesh = add_randam_data(ax,ih,iw)
plt.show()
## Here I want to get this 25x10 array to be saved, but how?