Reputation: 197
I want to display Google map and I use this code :
url = "http://maps.googleapis.com/maps/api/staticmap?center=-30.027489,-51.229248&size=800x800&zoom=14&sensor=false"
im = Image.open(cStringIO.StringIO(urllib2.urlopen(url).read()))
plt.imshow(im)
plt.show()
Which I don't understand
Upvotes: 1
Views: 2080
Reputation: 4679
Take a look at the documentation of imshow()
and specifically its origin
argument which determines where the [0,0] index of the array is located in the plot.
The line needs to be:
plt.imshow(im, origin='upper')
Upvotes: 2