1

Im wanting to use imshow() to create an image of a 2D histogram. However on several of the examples ive seen the 'extent' is defined. What does 'extent' actually do and how do you choose what values are appropriate?

blablabla
  • 304
  • 1
  • 8
  • 18

1 Answers1

2

Extent defines the images max and min of the horizontal and vertical values. It takes four values like so: extent=[horizontal_min,horizontal_max,vertical_min,vertical_max].

Gael Goret
  • 62
  • 7
  • but in this example ive seen online that doesnt seem to be the case. [link](http://www.physics.ucdavis.edu/~dwittman/Matplotlib-examples/) – blablabla Aug 29 '13 at 12:52
  • on the page you link to `extent` has the value `[-6.0, 4.0, -4.0, 6.0]`, which is exactly what Gael specified. – numentar Aug 29 '13 at 13:33