Re: [Matplotlib-users] Map displayed on a plot

2010-08-27 Thread Jeff Whitaker
On 8/27/10 12:05 PM, Brian Larsen wrote: Thanks, that a step, but how do I tell matplotlib where to then put this map? It needs to be on the current figure with the current axes but between 0 and 1 in radius. Imagine this plot but the black circle instead contains a map of the earth as seen

Re: [Matplotlib-users] Map displayed on a plot

2010-08-27 Thread Brian Larsen
Thanks, that a step, but how do I tell matplotlib where to then put this map? It needs to be on the current figure with the current axes but between 0 and 1 in radius. Imagine this plot but the black circle instead contains a map of the earth as seen from space in the right viewing geometry. h

Re: [Matplotlib-users] Map displayed on a plot

2010-08-27 Thread Jeff Whitaker
On 8/27/10 11:39 AM, Brian Larsen wrote: Ben, I have but no where in there do I see (or at least understand) how to draw a map on top of a current figure with set bounds in data space... Cheers, Brian Brian: Something like this perhaps? from pylab import * from mpl_toolkits.basemap impo

Re: [Matplotlib-users] Map displayed on a plot

2010-08-27 Thread Aman Thakral
Here is an example of the general usage for an orthographic projection. def genMap(fig, ax, llcrnrlon,llcrnrlat,urcrnrlon,urcrnrlat): fig.sca(ax) m = Basemap(resolution='i',projection='ortho',lon_0=(urcrnrlon+llcrnrlon)/2,lat_0=(urcrnrlat+llcrnrlat)/2) m.drawcoastlines()

Re: [Matplotlib-users] Map displayed on a plot

2010-08-27 Thread Brian Larsen
Ben, I have but no where in there do I see (or at least understand) how to draw a map on top of a current figure with set bounds in data space... Cheers, Brian On Aug 27, 2010, at 11:24 AM, Benjamin Root wrote: > On Fri, Aug 27, 2010 at 12:11 PM, Brian Larsen wrote: > Hello all, > > I a

Re: [Matplotlib-users] Map displayed on a plot

2010-08-27 Thread Jeff Whitaker
On 8/27/10 11:24 AM, Benjamin Root wrote: On Fri, Aug 27, 2010 at 12:11 PM, Brian Larsen > wrote: Hello all, I am plotting satellite orbit files and it looks really nice to plot an Earth in the center with the continents on it to orient people to where

Re: [Matplotlib-users] Map displayed on a plot

2010-08-27 Thread Benjamin Root
On Fri, Aug 27, 2010 at 12:11 PM, Brian Larsen wrote: > Hello all, > > I am plotting satellite orbit files and it looks really nice to plot an > Earth in the center with the continents on it to orient people to where the > spacecraft is. Does anyway know how to do this? All I seem to be able to

[Matplotlib-users] Map displayed on a plot

2010-08-27 Thread Brian Larsen
Hello all, I am plotting satellite orbit files and it looks really nice to plot an Earth in the center with the continents on it to orient people to where the spacecraft is. Does anyway know how to do this? All I seem to be able to do is create a whole globe as the figure. In this simple ex