Projections - custom_projection_example.py

Hello,

I have been trying to modify the custom projection example (http://matplotlib.sourceforge.net/examples/api/custom_projection_example.html) to plot a Sanson Flamsteed Projection (Sinusoidal projection).

Such a projection is defined as:

long0=0
x = (long-long0)*cos(lat)
y=lat

The problem is how to correctly handle the:
* _gen_axes_patch
* _gen_axes_spines

As the resultant plot area/plot boundaries is not circular/elliptical like the examples provided.

Does anyone, who has played with this projections, or has better understanding of matplotlib provide me with a way to handle this?

Regards

Mitchell

Dear Mitchell,

Can you use the 'sinu' projection in basemap? E.g. basemap/examples/contour_demo.py figure 1.

-Andrew

···

On 10/2/2010 8:33 PM, Mitchell Jon Stanton-Cook wrote:

Hello,

I have been trying to modify the custom projection example
(http://matplotlib.sourceforge.net/examples/api/custom_projection_example.html)
to plot a Sanson Flamsteed Projection (Sinusoidal projection).

Hi Andrew,

Thanks for the reply.

I do not want to force users of my software to have to download and install basemap. It's just overkill for a small Python program that I'm developing.

Perhaps I'm best to try and use a PathPatch for the _gen_axes_patch _gen_axes_spines. Does anyone have any ideas?

Regards

Mitch

···

On 04/10/10 06:10, Andrew Straw wrote:

   On 10/2/2010 8:33 PM, Mitchell Jon Stanton-Cook wrote:
   

Hello,

I have been trying to modify the custom projection example
(http://matplotlib.sourceforge.net/examples/api/custom_projection_example.html)
to plot a Sanson Flamsteed Projection (Sinusoidal projection).
     

Dear Mitchell,

Can you use the 'sinu' projection in basemap? E.g.
basemap/examples/contour_demo.py figure 1.

-Andrew

------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security
easier or more difficult to achieve? Read this whitepaper to separate the
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

Hi Andrew,

Thanks for the reply.

I do not want to force users of my software to have to download and
install basemap. It's just overkill for a small Python program that I'm
developing.

Perhaps I'm best to try and use a PathPatch for the _gen_axes_patch
_gen_axes_spines. Does anyone have any ideas?
   

Yes -- you would need to make a custom shape, and PathPatch or Polygon (if straight line segments are sufficient) are probably the way to go.

Mike

···

On 10/04/2010 02:10 AM, Mitchell Jon Stanton-Cook wrote:

Regards

Mitch

On 04/10/10 06:10, Andrew Straw wrote:
   

    On 10/2/2010 8:33 PM, Mitchell Jon Stanton-Cook wrote:

Hello,

I have been trying to modify the custom projection example
(http://matplotlib.sourceforge.net/examples/api/custom_projection_example.html)
to plot a Sanson Flamsteed Projection (Sinusoidal projection).

Dear Mitchell,

Can you use the 'sinu' projection in basemap? E.g.
basemap/examples/contour_demo.py figure 1.

-Andrew

------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security
easier or more difficult to achieve? Read this whitepaper to separate the
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security
easier or more difficult to achieve? Read this whitepaper to separate the
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options
   
--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA