0

I want to have my scatter points ontop of an image but the values are between 0-15,000 but the image size is just 512x512px, so the points are way to the side of a very tiny image..

import matplotlib.pyplot as plt
im = plt.imread(image_name)
implot = plt.imshow(im)

#data
plt.scatter([1000], [2000])

But this just makes a small picture with a point way off to the side. I tried resizing the image externally to 15000x15000 and increasing the PIL max pixels but the resulting image has no image, not sure why

ht141379
  • 21
  • 2
  • `imshow()` has a parameter `extent=[x0,x1,y0,y1]` , e.g. `plt.imshow(im, extent=[0,15000,0,15000])`, to tell what the "real world" coordinates of the image correspond to. – JohanC Feb 01 '23 at 08:19

0 Answers0