milkviz.polygon_map#
- milkviz.polygon_map(polygons, *, types=None, order=None, values=None, colors=None, cmap=None, norm=None, vmin=None, vmax=None, center=None, rotate=None, edgecolor=None, edgewidth=None, frameon=False, legend=True, legend_kw=None, cbar_kw=None, ax: Optional[Axes] = None, **kwargs)#
Polygon map
- Parameters
- polygonsarray-like
A list of polygons, a polygon is represented by a list of points
- types
The categorical label for each polygon
- orderarray-like
The order of types that presents in legends
- valuesarray-like
The numeric value for each polygon
- colorsarray, mapping
Either array that represents colors or a dict that map types to colors
- cmap
- norm
- vmin
- vmax
- center
- rotatefloat
The degree to rotate the whole plot according to origin
- edgecolorcolor
- edgewidthfloat
- frameonbool
If True, will turn off the frame of the plot
- legendbool
Whether to show the legend
- legend_kwdict
Pass to
legendkit.legend()
- cbar_kwdict
Pass to
legend.colorbar()
- axAxes
- kwargs
Pass to
matplotlib.axes.Axes.scatter()
- Returns
- Axes