Details and Options
The basic usage syntax is ResourceFunction["PolygonMarker"][shape,spec], where shape is the name of a predefined shape or a list of 2D coordinates describing a simple polygon, and spec can be either size or {size, angle}.
The
size can be given as a number or in
Scaled or
Offset form.
The angle in radians determines the angle of counterclocwise rotation of shape about its centroid.
ResourceFunction["PolygonMarker"][shape,spec] returns a
Polygon graphics primitive that can be used in
Graphics.
ResourceFunction["PolygonMarker"][shape,spec,style], where
style is a list of graphics directives applied to
shape, returns a
Graphics object which can be used as a marker for
PlotMarkers.
ResourceFunction["PolygonMarker"][shape,spec,style,options] returns a
Graphics object with
options applied.
The centroid of
Polygon generated by
ResourceFunction["PolygonMarker"] is always placed at
{0,0} in the internal coordinate system of
Graphics.
ResourceFunction["PolygonMarker"][shape,spec,positions], where
positions is a list of 2D coordinates, evaluates to
Translate[ResourceFunction["PolygonMarker"][shape,spec],positions]. It represents a collection of multiple identical copies of
shape with centroids placed at
positions.
With an
Offset size specification, the plot marker has a fixed size specified in printer's points, independent of
ImageSize.
ResourceFunction["PolygonMarker"][shape,size] returns a
Polygon with area
size2 in the internal coordinate system of
Graphics.
ResourceFunction["PolygonMarker"][shape,Offset[size]] returns a
Polygon with area
size2 square printer’s points. The area taken by the boundary of the returned
Polygon isn’t taken into account.
ResourceFunction["PolygonMarker"][All] and
ResourceFunction["PolygonMarker"][] both return the complete list of names of predefined shapes.