milkviz.polygon_map(polygons: List[List[Tuple[float, float]]], types: List | np.ndarray = None, types_colors: Dict = None, values: List | np.ndarray = None, vmin: float = None, vmax: float = None, colors: List = None, cmap: Any = None, legend: bool = True, legend_kw: Dict = None, cbar_kw: Dict = None, rotate: int = None, no_spines: bool = True, ax: mpl.axes.Axes = None)#

Polygon map

  • polygons – A list of polygons, a polygon is represented by a list of points

  • types – The types array that tells the types of polygons

  • types_colors – A dictionary that tells color for every type, key is the type and value is the color

  • values – The values array that tells the values of polygons

  • vmin – Remap your values to another range

  • vmax – Remap your values to another range

  • colors – The color array that map to marker colors

  • cmap – The colormap to be used, either a cmap name or a

  • legend – If True, show legend

  • legend_kw – [legend_kw]

  • cbar_kw – [cbar_kw]

  • rotate – The degree to rotate the whole plot according to origin

  • no_spines – If True, will turn off the frame of the plot

  • ax – Pre-existing axes for the plot. Or a new one will be created.


A matplotlib.axes.Axes instance