In a Python script, I have a set of 2D NumPy float arrays, let say n1, n2, n3 and n4. For each such array I have two integer values offset_i_x and offset_i_y (replace i by 1, 2, 3 and 4).
Currently I'm able to create an image for one NumPy array using the following script:
def make_img_from_data(data)
fig = plt.imshow(data, vmin=-7, vmax=0)
fig.set_cmap(cmap)
fig.axes.get_xaxis().set_visible(False)
fig.axes.get_yaxis().set_visible(False)
filename = "my_image.png"
plt.savefig(filename, bbox_inches='tight', pad_inches=0)
plt.close()
Now I would like to consider each array to be a tile of a bigger image and should be placed according to the offset_i_x/y values, to finally write a single figure instead of 4 (in my example). I'm very new to MatplotLib and Python in general. How can I do that?
Also I have noticed that the script above produces images that are 480x480 pixels, whatever the size of the original NumPy array. How can I control the size of the resulting image?
Thanks
