日本の県境、世界の国々の州等の境界線(南北アメリカ大陸はありません)のシェイプファイルを利用する。
シェイプファイルのダウンロード
Natural Earth
http://www.naturalearthdata.com/downloads/
の
「Large scale data, 1:10m」 「Cultural」 「Admin 1 – States, Provinces」 「Download states and provinces」
をダウンロードする。
# !/usr/bin/python3
# coding: UTF-8
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from geonamescache import GeonamesCache
from matplotlib.patches import Polygon
from matplotlib.collections import PatchCollection
from mpl_toolkits.basemap import Basemap
font = {'family':'IPAGothic'} #日本語Fontを指定
map = Basemap(lon_0 = 155,resolution='i',projection='cyl')
map.drawcoastlines()
map.drawcountries()
map.drawmapboundary(fill_color='aqua')
map.fillcontinents(color='gray')
shapefile = 'ne_10m_admin_1_states_provinces/ne_10m_admin_1_states_provinces'
map.readshapefile(shapefile, 'prefectural_bound', color='#444444', linewidth=.2)
plt.show()
日本の県境及び南北アメリカ大陸を除く世界各国の州等の境界線が描画される。