Fw: matplotlib - fill open path inside U.S. borders + sample map

The attached map shows plotted fill paths whose filling extends only to the U.S. borders. Is there any way I could accomplish something like it using Basemap?

Thanks

day2otlk_1730.gif

···

---------- Forwarded Message ----------
From: "Isidora" <isidora@...3269...>
To: matplotlib-users@lists.sourceforge.net
Subject: matplotlib - fill open path inside U.S. borders
Date: Mon, 26 Sep 2011 19:55:49 GMT

Hi,
I am trying to plot filled paths over a U.S. map. I plot the given paths, but since these are not closed paths, the filling is truncated at a line drawn between last and first point in the path. I want to extend the path to the United States border instead.

I am no expert in matplotlib or GIS. Could anyone help me find documentation or blogs discussing this type of issue? I am convinced somebody else has already faced this problem although I have not been able to find any paper, documentation, blog on it.

Thank you


The attached map shows plotted fill paths whose filling extends only to the U.S. borders. Is there any way I could accomplish something like it using Basemap?
Thanks

Isidora:

It's probably possible, but there's no simple recipe.  The

drawcoastlines method returns a LineCollection which you should be
able to use to do what you want. Sorry I can’t be more specific,
but I don’t have time to go into any more depth right now.

-Jeff
···

<isidora@…3269…>matplotlib-users@lists.sourceforge.nethttp://p.sf.net/sfu/splunk-d2dcopy1Matplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-users


The attached map shows plotted fill paths whose filling extends only to the U.S. borders. Is there any way I could accomplish something like it using Basemap?
Thanks

Isidora:

  It's probably possible, but there's no simple recipe.  The

drawcoastlines method returns a LineCollection which you should be
able to use to do what you want. Sorry I can’t be more specific,
but I don’t have time to go into any more depth right now.

  -Jeff
Isidora:  Another option would be to create a gridded field defining

the area you would like to enclose, use contourf to draw the
boundaries of the region, then mask out the ocean areas with the
maskoceans function.

-Jeff
···

http://p.sf.net/sfu/splunk-d2dcopy1Matplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-users

Hi Isidora, in the past I used the matlab function below for a similar
task. Maybe it can be adapted to your problem. If you can provide a
small sample of your problem I can try to implement that in python (it
has been in my TODO list for a while, but i cannot promise.)

http://woodshole.er.usgs.gov/operations/sea-mat/mapstuff-html/join_cst.m

-Filipe

···

On Wed, Sep 28, 2011 at 09:39, Jeff Whitaker <jswhit@...146...> wrote:

On 9/27/11 5:37 PM, Jeff Whitaker wrote:

On 9/27/11 4:57 PM, Isidora wrote:

The attached map shows plotted fill paths whose filling extends only to the
U.S. borders. Is there any way I could accomplish something like it using
Basemap?

Thanks

Isidora:

It's probably possible, but there's no simple recipe. The drawcoastlines
method returns a LineCollection which you should be able to use to do what
you want. Sorry I can't be more specific, but I don't have time to go into
any more depth right now.

-Jeff

Isidora: Another option would be to create a gridded field defining the
area you would like to enclose, use contourf to draw the boundaries of the
region, then mask out the ocean areas with the maskoceans function.

-Jeff

---------- Forwarded Message ----------
From: "Isidora" <isidora@...3269...>
To: matplotlib-users@lists.sourceforge.net
Subject: matplotlib - fill open path inside U.S. borders
Date: Mon, 26 Sep 2011 19:55:49 GMT

Hi,
I am trying to plot filled paths over a U.S. map. I plot the given paths,
but since these are not closed paths, the filling is truncated at a line
drawn between last and first point in the path. I want to extend the path
to the United States border instead.

I am no expert in matplotlib or GIS. Could anyone help me find
documentation or blogs discussing this type of issue? I am convinced
somebody else has already faced this problem although I have not been able
to find any paper, documentation, blog on it.

Thank you

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users