示例#1
0
import matplotlib.pyplot as plt
from pymapgb import GBBasemap

fig, ax = plt.subplots(figsize=(8, 12))

GBmap = GBBasemap(ax, threshold=50)

for country in ['england', 'wales', 'scotland']:
    GBmap.draw_by_request("country", country, facecolor="w", edgecolor="k")
    GBmap.draw_by_request("counties", country, colors='random')

GBmap.ax.autoscale()
plt.savefig("counties.png")


示例#2
0
import matplotlib.pyplot as plt
from pymapgb import GBBasemap

fig, ax = plt.subplots(figsize=(8, 12))

GBmap = GBBasemap(ax, threshold=50)
GBmap.draw_by_request("country", "england", facecolor="w", edgecolor="k")
GBmap.draw_by_request("country", "wales", facecolor="r", edgecolor="k")
GBmap.draw_by_request("country", "scotland", facecolor="b", lw=2)

GBmap.ax.autoscale()
plt.savefig("countries.png")


示例#3
0
import matplotlib.pyplot as plt
from pymapgb import GBBasemap

fig, ax = plt.subplots(figsize=(8, 12))

GBmap = GBBasemap(ax, threshold=50)

for country in ['england', 'wales', 'scotland']:
    GBmap.draw_by_request("country", country, facecolor="w", edgecolor="k")

GBmap.draw_from_data(['derbyshire'], ["r"], "counties", "england")
GBmap.ax.autoscale()
plt.savefig("draw_from_data.png")