答案 0 :(得分:2)
你可以使用suptitle()
功能并调整你的身材。
from mpl_toolkits.basemap import Basemap, cm
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure(figsize=(15,8))
# create Basemap instance.
m = Basemap(projection='lcc',lat_0=-30,lon_0=-50,
llcrnrlat=-30,urcrnrlat=10,
llcrnrlon=-80,urcrnrlon=-20,
resolution='c')
# draw coastlines, state and country boundaries, edge of map.
m.drawcoastlines()
m.drawstates()
m.drawcountries()
# draw parallels.
parallels = np.arange(-90.,90,10.)
m.drawparallels(parallels,labels=[1,0,0,0],fontsize=10)
# draw meridians
meridians = np.arange(180.,360.,10.)
m.drawmeridians(meridians,labels=[0,0,1,1],fontsize=10)
# add title
plt.title('PROBLEM!!')
fig = plt.figure(figsize=(15,8))
# create Basemap instance.
m = Basemap(projection='lcc',lat_0=-30,lon_0=-50,
llcrnrlat=-30,urcrnrlat=10,
llcrnrlon=-80,urcrnrlon=-20,
resolution='c')
# draw coastlines, state and country boundaries, edge of map.
m.drawcoastlines()
m.drawstates()
m.drawcountries()
# draw parallels.
parallels = np.arange(-90.,90,10.)
m.drawparallels(parallels,labels=[1,0,0,0],fontsize=10)
# draw meridians
meridians = np.arange(180.,360.,10.)
m.drawmeridians(meridians,labels=[0,0,1,1],fontsize=10)
# add title
plt.suptitle('NO PROBLEM!!')
plt.show()