I am trying to in python figure out how to use basemap to make plots like this:
Focusing on the upper left plot, this is a 2d histogram of density in each bin with a graphic Earth overlaid in the center.
The big issue I have is that basemap doesn't seem to play nicely as an overplot. I can pass axes in but it seems to take over these axes and not behave well. I would be really awesome to be able to use the basemap bluemarble interface to get a really cool looking Earth with the right shading and all for the current date and time and viewpoint.
In my case I am making 2d contour plots in polar (or using bar to get little curved boxes that look great) and want to place an earth spanning out to radius 1.
Here is an even simpler example of what doesn't work.
import matplotlib.pyplot as plt
import basemap
from mpl_toolkits.basemap import Basemap
plt.plot(range(-10,10))
ax = plt.gca()
map = Basemap(projection='ortho',lat_0=45,lon_0=-100,resolution='l', ax=ax)
map.fillcontinents(color='coral',lake_color='aqua')
As you can see basemap totally took over the axis and the plot made first is no where to be seen.
You can try the following:
This plot has to be then formatted accordingly, in this case, with transparency and without axis information:
And finally, the earth globe using basemap:
The trick is to place the secondary axis (ax2) in the center using the add_axes method. You can play with the axes limits to obtain the numbers you need. Hope it helps. Example image of the code