How to allocate multiple images based on coordinate

38 Views Asked by At

I have multiple image files and text, and try to allocate them based on corrdinates.

Let's say I have two image files, img1 and img2. These images are made by matplotlib and converted

I tried to using matplotlib imshow as follows.

a1 = (0, 10, 0, 10)
a2 = (0, 30, 0, 10)

fig, axes = plt.subplots(1, 2) 
axes[0].imshow(img1, extent=a1)
axes[0].set_axis_off()
axes[1].imshow(img2, extent=a2)
axes[1].set_axis_off()

The result is as follows.
enter image description here

As you can see, there are two problems. First, I want to locate these images whose corrdinates are a1 and a2, respectively, but they are not located as I expected. Second, image becomes to hazy.

How to solve the problem and do you have any suggestion?

0

There are 0 best solutions below