python - Plotting text on basemap -


suppose want plot 'text' on basemap on spain, work.

from mpl_toolkits.basemap import basemap import matplotlib.pyplot plt   m = basemap(resolution='l') fig = plt.figure(figsize=(12,10)) m.drawcoastlines(linewidth=0.5) plt.annotate('text',xy=(0,40),ha="center") plt.show() 

but doesn't work on merc view, no matter x/y value specify. e.g:

m = basemap(projection='merc',resolution='c',llcrnrlat=36,llcrnrlon=-20,urcrnrlat=61,urcrnrlon=33) fig = plt.figure(figsize=(12,10)) m.drawcoastlines(linewidth=0.5) plt.annotate('text',xy=(0,40),ha="center") plt.show() 

will show text in bottom left. how plot text in view?


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -