1

I am trying to open an image to a certain part of the screen. My code currently opens the image in the left corner of the screen, but I need it to open in the center. How do I change the location where the image is opened on the screen?

code:

import numpy as np
import matplotlib.pyplot as plt
from PIL import Image

imageAdress = r"C:\Users\danie\Downloads\img.png"
image = Image.open(imageAddress)
imageNumpyFormat = np.asarray(image)

plt.imshow(imageNumpyFormat)
plt.draw()
plt.pause(5) 
plt.close()
donutgoose
  • 31
  • 5
  • Does this answer your question? https://stackoverflow.com/questions/7449585/how-do-you-set-the-absolute-position-of-figure-windows-with-matplotlib – medium-dimensional Jun 04 '22 at 19:34

0 Answers0