代码:
# 导入包
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
# 投影方式选择
m = Basemap(projection = 'cyl')
# 画海岸线
m.drawcoastlines()
# 上色
m.fillcontinents(color = 'coral', lake_color = 'aqua')
m.drawmapboundary(fill_color = 'aqua')
# 画经纬度线
m.drawparallels(np.arange(-90.,91.,30.))
m.drawmeridians(np.arange(-180.,181.,60.))
# 送上标题
plt.title("Cylindrical Equidistant Projection")
plt.show()
代码:
# 导入包
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
# 投影方式选择
m = Basemap(projection = 'merc', llcrnrlat = -80, urcrnrlat = 80, llcrnrlon = -180, urcrnrlon = 180, lat_ts = 20, resolution = 'c')
# 画海岸线
m.drawcoastlines()
# 上色
m.fillcontinents(color = 'coral', lake_color = 'aqua')
m.drawmapboundary(fill_color = 'aqua')
# 画经纬度线
m.drawparallels(np.arange(-90.,91.,30.))
m.drawmeridians(np.arange(-180.,181.,60.))
# 送上标题
plt.title("Mercator Projection")
plt.show()
代码:
# 导入包
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
# 投影方式选择
m = Basemap(projection = 'tmerc', llcrnrlat = 49.5, urcrnrlat = 59.5, llcrnrlon = -10.5, urcrnrlon = 3.5, lon_0 = -4.36, lat_0 = 54.7, resolution = 'i')
# 画海岸线
m.drawcoastlines()
# 上色
m.fillcontinents(color = 'coral', lake_color = 'aqua')
m.drawmapboundary(fill_color = 'aqua')
# 画经纬度线
m.drawparallels(np.arange(-40,61.,2.))
m.drawmeridians(np.arange(-20.,21.,2.))
# 送上标题
plt.title("Transverse Mercator Projection")
plt.show()
代码:
# 导入包
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
# 投影方式选择
m = Basemap(projection = 'omerc', height = 16700000, width = 12000000, area_thresh = 1000., lon_0 = -100, lat_0 = 15, lon_1 = -50, lat_1 = -55, lon_2 = -120, lat_2 = 65, resolution = 'l')
# 画海岸线
m.drawcoastlines()
# 上色
m.fillcontinents(color = 'coral', lake_color = 'aqua')
m.drawmapboundary(fill_color = 'aqua')
# 画经纬度线
m.drawparallels(np.arange(-80.,81.,20.))
m.drawmeridians(np.arange(180.,181.,20.))
# 送上标题
plt.title("Oblique Mercator Projection")
plt.show()
代码:
# 导入包
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
# 投影方式选择
m = Basemap(projection = 'mill', llcrnrlat = -90, urcrnrlat = 90, llcrnrlon = -180, urcrnrlon = 180, resolution = 'c')
# 画海岸线
m.drawcoastlines()
# 上色
m.fillcontinents(color = 'coral', lake_color = 'aqua')
m.drawmapboundary(fill_color = 'aqua')
# 画经纬度线
m.drawparallels(np.arange(-90.,91.,30.))
m.drawmeridians(np.arange(-180.,181.,60.))
# 送上标题
plt.title("Miller Cylindrical Projection")
plt.show()
代码:
# 导入包
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
# 投影方式选择
m = Basemap(projection = 'gall', llcrnrlat = -90, urcrnrlat = 90, llcrnrlon = -180, urcrnrlon = 180, resolution = 'c')
# 画海岸线
m.drawcoastlines()
# 上色
m.fillcontinents(color = 'coral', lake_color = 'aqua')
m.drawmapboundary(fill_color = 'aqua')
# 画经纬度线
m.drawparallels(np.arange(-90.,91.,30.))
m.drawmeridians(np.arange(-180.,181.,60.))
# 送上标题
plt.title("Gall Stereographic Projection")
plt.show()
代码:
# 导入包
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
# 投影方式选择
m = Basemap(projection = 'cea', llcrnrlat = -90, urcrnrlat = 90, llcrnrlon = -180, urcrnrlon = 180, resolution = 'c')
# 画海岸线
m.drawcoastlines()
# 上色
m.fillcontinents(color = 'coral', lake_color = 'aqua')
m.drawmapboundary(fill_color = 'aqua')
# 画经纬度线
m.drawparallels(np.arange(-90.,91.,30.))
m.drawmeridians(np.arange(-180.,181.,60.))
# 送上标题
plt.title("Cylindrical Equal-Area Projection")
plt.show()
代码:
# 导入包
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
# 投影方式选择
m = Basemap(projection = 'lcc', lat_0 = 50, lon_0 = -107., lat_1 = 45., lat_2 = 55, width = 12000000, height = 9000000, rsphere = (6378137.00, 6356752.3142), resolution = 'l')
# 画海岸线
m.drawcoastlines()
# 上色
m.fillcontinents(color = 'coral', lake_color = 'aqua')
m.drawmapboundary(fill_color = 'aqua')
# 画经纬度线
m.drawparallels(np.arange(-80.,81.,20.))
m.drawmeridians(np.arange(-180.,181.,20.))
# 送上标题
plt.title("Lambert Conformal Projection")
plt.show()
代码:
# 导入包
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
# 投影方式选择
m = Basemap(projection = 'laea', lat_0 = 50, lon_0 = -107., lat_ts = 50, width = 12000000, height = 8000000, resolution = 'l')
# 画海岸线
m.drawcoastlines()
# 上色
m.fillcontinents(color = 'coral', lake_color = 'aqua')
m.drawmapboundary(fill_color = 'aqua')
# 画经纬度线
m.drawparallels(np.arange(-80.,81.,20.))
m.drawmeridians(np.arange(-180.,181.,20.))
# 送上标题
plt.title("Lambert Azimuthal Equal Area Projection")
plt.show()
代码:
结果:
代码:
结果:
代码:
结果:
代码:
结果:
代码:
结果:
代码:
结果:
代码:
结果:
代码:
结果:
代码:
结果: