Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Basemap.drawcounties method does not use the 'antialiased' parameter #501

Closed
TheFizzWare opened this issue Sep 20, 2020 · 1 comment
Closed

Comments

@TheFizzWare
Copy link

Current method:

def drawcounties(self,linewidth=0.1,linestyle='solid',color='k',antialiased=1, facecolor='none',ax=None,zorder=None,drawbounds=False):
    """
    Draw county boundaries in US. The county boundary shapefile
    originates with the NOAA Coastal Geospatial Data Project
    (http://coastalgeospatial.noaa.gov/data_gis.html).

    .. tabularcolumns:: |l|L|

    ==============   ====================================================
    Keyword          Description
    ==============   ====================================================
    linewidth        county boundary line width (default 0.1)
    linestyle        coastline linestyle (default solid)
    color            county boundary line color (default black)
    facecolor        fill color of county (default is no fill)
    antialiased      antialiasing switch for county boundaries
                     (default True).
    ax               axes instance (overrides default axes instance)
    zorder           sets the zorder for the county boundaries (if not
                     specified, uses default zorder for
                     matplotlib.patches.LineCollections).
    ==============   ====================================================

    returns a matplotlib.patches.LineCollection object.
    """
    ax = ax or self._check_ax()
    gis_file = os.path.join(basemap_datadir,'UScounties')
    county_info = self.readshapefile(gis_file,'counties',\
                  default_encoding='latin-1',drawbounds=drawbounds)
    counties = [coords for coords in self.counties]
    counties = PolyCollection(counties)
    counties.set_linestyle(linestyle)
    counties.set_linewidth(linewidth)
    counties.set_edgecolor(color)
    counties.set_facecolor(facecolor)
    counties.set_label('counties')
    if zorder:
        counties.set_zorder(zorder)
    ax.add_collection(counties)
    return counties

Suggested revision:
Replace counties = PolyCollection(... instantiation line with
counties = PolyCollection(counties, antialiaseds=(antialiased,))

@molinav molinav added this to the v1.4.0 milestone Aug 23, 2023
@molinav molinav removed this from the v1.4.0 milestone Nov 21, 2023
molinav added a commit that referenced this issue Nov 21, 2023
@molinav
Copy link
Member

molinav commented Nov 21, 2023

I am closing the issue as complete, since the patch has been pushed to the repository targeting the hotfix 1.3.9. Thanks!

@molinav molinav closed this as completed Nov 21, 2023
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

No branches or pull requests

2 participants