#NEWLINE# def plot_series( s , cmap = 'Set1' , color = None , ax = None , linewidth = 1.0 , figsize = None , **color_kwds ) : #NEWLINE# #INDENT# " Plot a GeoSeries\n\n        Generate a plot of a GeoSeries geometry with matplotlib.\n\n        Parameters\n        ----------\n\n        Series\n            The GeoSeries to be plotted.  Currently Polygon,\n            MultiPolygon, LineString, MultiLineString and Point\n            geometries can be plotted.\n\n        cmap : str (default 'Set1')\n            The name of a colormap recognized by matplotlib.  Any\n            colormap will work, but categorical colormaps are\n            generally recommended.  Examples of useful discrete\n            colormaps include:\n\n                Accent, Dark2, Paired, Pastel1, Pastel2, Set1, Set2, Set3\n\n        color : str (default None)\n            If specified, all objects will be colored uniformly.\n\n        ax : matplotlib.pyplot.Artist (default None)\n            axes on which to draw the plot\n\n        linewidth : float (default 1.0)\n            Line width for geometries.\n\n        figsize : pair of floats (default None)\n            Size of the resulting matplotlib.figure.Figure. If the argument\n            ax is given explicitly, figsize is ignored.\n\n        **color_kwds : dict\n            Color options to be passed on to the actual plot function\n\n        Returns\n        -------\n\n        matplotlib axes instance\n    " #NEWLINE# if ( 'colormap' in color_kwds ) : #NEWLINE# #INDENT# warnings . warn ( "'colormap' is deprecated, please use 'cmap' instead (for consistency with matplotlib)" , FutureWarning ) #NEWLINE# cmap = color_kwds . pop ( 'colormap' ) #NEWLINE# #UNINDENT# if ( 'axes' in color_kwds ) : #NEWLINE# #INDENT# warnings . warn ( "'axes' is deprecated, please use 'ax' instead (for consistency with pandas)" , FutureWarning ) #NEWLINE# ax = color_kwds . pop ( 'axes' ) #NEWLINE# #UNINDENT# import matplotlib.pyplot as plt #NEWLINE# if ( ax is None ) : #NEWLINE# #INDENT# ( fig , ax ) = plt . subplots ( figsize = figsize ) #NEWLINE# ax . set_aspect ( 'equal' ) #NEWLINE# #UNINDENT# color_generator = gencolor ( len ( s ) , colormap = cmap ) #NEWLINE# for geom in s : #NEWLINE# #INDENT# if ( color is None ) : #NEWLINE# #INDENT# col = next ( color_generator ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# col = color #NEWLINE# #UNINDENT# if ( ( geom . type == 'Polygon' ) or ( geom . type == 'MultiPolygon' ) ) : #NEWLINE# #INDENT# if ( 'facecolor' in color_kwds ) : #NEWLINE# #INDENT# plot_multipolygon ( ax , geom , linewidth = linewidth , ** color_kwds ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# plot_multipolygon ( ax , geom , facecolor = col , linewidth = linewidth , ** color_kwds ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( geom . type == 'LineString' ) or ( geom . type == 'MultiLineString' ) ) : #NEWLINE# #INDENT# plot_multilinestring ( ax , geom , color = col , linewidth = linewidth , ** color_kwds ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( geom . type == 'Point' ) : #NEWLINE# #INDENT# plot_point ( ax , geom , color = col , ** color_kwds ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# plt . draw ( ) #NEWLINE# return ax