本文整理汇总了Python中mpl_toolkits.basemap.Basemap.title方法的典型用法代码示例。如果您正苦于以下问题:Python Basemap.title方法的具体用法?Python Basemap.title怎么用?Python Basemap.title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mpl_toolkits.basemap.Basemap
的用法示例。
在下文中一共展示了Basemap.title方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from mpl_toolkits.basemap import Basemap [as 别名]
# 或者: from mpl_toolkits.basemap.Basemap import title [as 别名]
['NV',38.4199,-117.1219],
['NY',42.1497,-74.9384],
['OH',40.3736,-82.7755],
['OK',35.5376,-96.9247],
['OR',44.5672,-122.1269],
['PA',40.5773,-77.2640],
['RI',41.6772,-71.5101],
['SC',33.8191,-80.9066],
['SD',44.2853,-99.4632],
['TN',35.7449,-86.7489],
['TX',31.1060,-97.6475],
['UT',40.1135,-111.8535],
['VA',37.7680,-78.2057],
['VT',44.0407,-72.7093],
['WA',47.3917,-121.5708],
['WI',44.2563,-89.6385],
['WV',38.4680,-80.9696],
['WY',42.7475,-107.2085]]
for i in range(len(state2LatLong)):
# Get the x,y coordinate for the geoplot. Note: It's Long / Lat.
x, y = geoMap(state2LatLong[i][2],state2LatLong[i][1])
geoMap.plot(x,y,'ro')
geoMap.text(x+10000,y+10000,state2LatLong[i][0], bbox=dict(facecolor='yellow',alpha=0.5))
# Adjust size of image
geoMap.gcf().set_size_inches(12.0,8.0)
# Add Title and show.
geoMap.title("US Map with Labels")
geoMap.show()