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?
Asked
Active
Viewed 130 times
1
-
Please learn to read the [docs](http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.imshow) – tacaswell Aug 29 '13 at 16:03
-
This question appears to be off-topic because it is about documentation – Andy Mar 01 '14 at 14:17
1 Answers
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