I can use matplotlib
's Basemap
in Python to draw a globe, and I can set the colour of the globe and anything I draw on it (continents, etc). But this globe image is set on a white background; how do I change the colour of that white background?
Code like this:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
m = Basemap(projection='ortho',lat_0=0,lon_0=0,resolution='c')
m.drawmapboundary(fill_color='black')
m.drawcoastlines(linewidth=1.25, color='#006600')
plt.savefig('/tmp/out.png')
produces this, with the white background that I'd like to change