我已经使用 miniconda2 安装了 cartopy。当运行一个小样本时,代码永远不会通过 plt.imshow 行上的图像转换,它只是使用 100% CPU 挂在那里。这是代码:
#!~/miniconda2/bin/python
import cartopy.crs as ccrs
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import datetime
import time
import sys
print datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')
fname = '2016_2_24_1200_MTSAT3_10_S1_grid.jpeg'
img = plt.imread(fname)
print datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')
img_proj = ccrs.Geostationary(satellite_height=35786000)
img_extent = (-5500000, 5500000, -5500000, 5500000)
ax = plt.axes(projection=ccrs.Miller())
ax.coastlines()
ax.set_global()
origin = 'upper'
print datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')
plt.imshow(img, transform=img_proj, extent=img_extent, origin=origin, cmap='gray')
fig.savefig('html/test.jpg')
任何线索任何人?