class_docstr: Draw map feature
  
  The map feature are drawn without any special projections.
  
  {usage}
  
  Parameters
  ----------
  {common_parameters}
  
  Notes
  -----
  This geom is best suited for plotting a shapefile read into
  geopandas dataframe. The dataframe should have a `geometry`
  column.
class_docstr_tok: ["Draw","map","feature","The","map","feature","are","drawn","without","any","special","projections",".","{","usage","}","Parameters","--","--","--","--","--","{","common_parameters","}","Notes","--","--","-","This","geom","is","best","suited","for","plotting","a","shapefile","read","into","geopandas","dataframe",".","The","dataframe","should","have","a","`","geometry","`","column","."]
code: def draw_panel(
      self,
      data: pd.DataFrame,
      panel_params: panel_view,
      coord: Coord,
      ax: Axes,
      **params: Any,
  ):
      if not len(data):
          return
  
      data.loc[data["color"].isna(), "color"] = "none"
      data.loc[data["fill"].isna(), "fill"] = "none"
      data["fill"] = to_rgba(data["fill"], data["alpha"])
  
      geom_type = data.geometry.iloc[0].geom_type
      if geom_type in ("Polygon", "MultiPolygon"):
          from matplotlib.collections import PatchCollection
  
          data["size"] *= SIZE_FACTOR
          patches = [PolygonPatch(g) for g in data["geometry"]]
          coll = PatchCollection(
              patches,
              edgecolor=data["color"],
              facecolor=data["fill"],
              linestyle=data["linetype"],
              linewidth=data["size"],
              zorder=params["zorder"],
              rasterized=params["raster"],
          )
          ax.add_collection(coll)
      elif geom_type == "Point":
          # Extract point coordinates from shapely geom
          # and plot with geom_point
          arr = np.array([list(g.coords)[0] for g in data["geometry"]])
          data["x"] = arr[:, 0]
          data["y"] = arr[:, 1]
          for _, gdata in data.groupby("group"):
              gdata.reset_index(inplace=True, drop=True)
              gdata.is_copy = None
              geom_point.draw_group(
                  gdata, panel_params, coord, ax, **params
              )
      elif geom_type == "MultiPoint":
          # Where n is the length of the dataframe (no. of multipoints),
          #       m is the number of all points in all multipoints
          #
          # - MultiPoint -> List of Points (tuples) (n -> m)
          # - Explode the list, to create a dataframe were each point
          #      is associated with the right aesthetics (n -> m)
          # - Create x & y columns from the points (m -> m)
          data["points"] = [
              [p.coords[0] for p in mp.geoms] for mp in data["geometry"]
          ]
          data = data.explode("points", ignore_index=True)
          data["x"] = [p[0] for p in data["points"]]
          data["y"] = [p[1] for p in data["points"]]
          geom_point.draw_group(data, panel_params, coord, ax, **params)
      elif geom_type in ("LineString", "MultiLineString"):
          from matplotlib.collections import LineCollection
  
          data["size"] *= SIZE_FACTOR
          data["color"] = to_rgba(data["color"], data["alpha"])
          segments = []
          for g in data["geometry"]:
              if g.geom_type == "LineString":
                  segments.append(g.coords)
              else:
                  segments.extend(_g.coords for _g in g.geoms)
  
          coll = LineCollection(
              segments,
              edgecolor=data["color"],
              linewidth=data["size"],
              linestyle=data["linetype"],
              zorder=params["zorder"],
              rasterized=params["raster"],
          )
          ax.add_collection(coll)
      else:
          raise TypeError(
              f"Could not plot geometry of type '{geom_type}'"
          )
  
file_path: plotnine/plotnine/geoms/geom_map.py
imports: from __future__ import annotations
  import typing
  import numpy
  import pandas
  from .._utils import SIZE_FACTOR, to_rgba
  from ..doctools import document
  from ..exceptions import PlotnineError
  from .geom import geom
  from .geom_point import geom_point
  from .geom_polygon import geom_polygon
label_desc: Use image node_id 3 for calling the geom_map obj's underlying member method code with example usage: obj.draw_panel(data, panel_params, coord, ax) without return types