A simple polygon.
In this simple example, we use Pyxplot’s polygon command to generate a geometric shape from a list of points. |
points = [ [0,-1], [0, 1], [2, 2], [2,1], [8,1], |
polygon points with fillcol gray50 col black |
![]() |
The first eight regular polygons.
This example uses Pyxplot’s flow control commands, together with its list methods and the polygon command, to generate a diagram of the first eight regular polygons. |
rotate(a) = matrix( [cos(a), -sin(a)], |
subroutine makePolygon(Nsides, centre) |
set nodisplay ; set multiplot |
set texthalign center |
foreach datum x,y,Nsides,name in "–" |
set display ; refresh |
![]() |