Skip to content

Conversation

pmarshwx
Copy link

This addresses what I consider somewhat of a corner-case when the user defines a "fill continents" color and then calls the "drawcounties" method. Currently, island portions of counties are drawn, but not filled in. This pull requests allows a user to supply a "facecolor" keyword argument that fills in the counties. Therefore, when specified, portions of counties that are (for example) islands results in the islands being filled.

This was done by converting the counties from a linecollection to a polycollection and then setting the facecolor argument. The default behavior remains the same (e.g., no filling).

Additionally, this will allow for industrious users to create choropleth maps by supplying lists of colors to fill counties with as the "set_facecolor" method of a polycollection will accept lists.

Added a keyword argument to allow for color filling counties. Achieved by conververting LineCollection to PolyCollection
@jswhit
Copy link

jswhit commented Oct 16, 2013

Looks good - please add a Changelog entry and I will merge.

@pmarshwx
Copy link
Author

Sorry it took so long. With the shutdown, this must have slipped through my email...

jswhit pushed a commit that referenced this pull request Nov 5, 2013
@jswhit jswhit merged commit e353bf2 into matplotlib:master Nov 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants