matplotlib / basemap

Plot on map projections (with coastlines and political boundaries) using matplotlib
MIT License
779 stars 392 forks source link

Use the default zorder of LineCollections for county polycollections. #340

Open WeatherGod opened 7 years ago

WeatherGod commented 7 years ago

Closes #324.

WeatherGod commented 7 years ago

Using as test code:

import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap

mm = Basemap(projection = 'merc', lat_0 = 42.0, lon_0 = -83.0, resolution = 'i', area_thresh = 0.1,
            llcrnrlon = -86.0, llcrnrlat = 39.0, urcrnrlon = -80.0, urcrnrlat = 45.0)
mm.drawmapboundary()
mm.fillcontinents(color = 'brown', lake_color = 'blue')
mm.drawcounties()
plt.show()

The counties show up now when they didn't before.

Technically speaking, this would break things for those who were expecting counties to have zorder of 0 and set the zorder for their things to be between 0 and 2.