0

I have an array of 2D data that I'd like to plot using imshow(). Since my data is in a 2D array, it's indexed as 0-300 x 0-300. However, the real data translates to physical X,Y coordinates. So, the value at arr[0,0] would actually correspond to the value at X,Y coordinate (-3,-3). I'm not sure how to properly plot that so that the axes of my plot range from (-3 to 3) as opposed to (0 to 300).

I'm using matplotlib and Python.

Swoldier
  • 155
  • 5
  • 19

1 Answers1

0

imshow comes with extent which solves your problem, you can read about how to use it here.

kebab-case
  • 1,732
  • 1
  • 13
  • 24