MeshPlotter.draw_polygons

MeshPlotter.draw_polygons(polygons)

Draws polygons on a 2D plot.

Parameters

polygons (list of dict) – List of dictionaries containing the polygon properties. The following properties can be specified in the dict.

  • points (list): XY(Z) coordinates of the polygon vertices.

  • text (str, optional): The text of the label. Default is None.

  • textcolor (rgb tuple or hex string, optional): Color of the label text. Default is black.

  • fontsize (int, optional): The size of the font of the label text. Default is `12.

  • facecolor (rgb tuple or hex string, optional): Color of the polygon face. Default is white.

  • edgecolor (rgb tuple or hex string, optional): Color of the edge of the polygon. Default is black.

  • edgewidth (float): Width of the polygon edge. Default is 1.0.

Returns

object – The matplotlib polygon collection object.