# 'POLYGON' Define/Draw a Polygon

> Source: https://manual.pvxplus.com/mnemonics/polygon

**GUI Display/Printer**

## Format

'POLOYGON'(*x*,*y*,*x*,*y*,*x*,*y*,*x*,*y* **...)**

***Where:***

|  |  |
| --- | --- |
| *x*,*y* | Set of point/position coordinates in graphical units. Numeric expression. |

## Description

Use **'POLYGON'** to draw (print) a polygon (e.g. triangle, hexagon, etc.). PxPlus joins the various *x,y* points to form the polygon. Use graphical units or **@X(col) / @Y(line)** functions for the coordinates.

The **'POLYGON'** mnemonic uses current attributes for the **'FILL'** and **'PEN'** mnemonics.

## See Also

**[@X(col) / @Y(line) Convert X/Y Coordinates](https://manual.pvxplus.com/functions/x)  
['FILL' Define Fill Style](https://manual.pvxplus.com/mnemonics/fill)**  
**['PEN' Define Pen Style](https://manual.pvxplus.com/mnemonics/pen)**

## Example

This example creates an irregular four-sided figure by setting the coordinates for the four corners:

```
print 'pen'(1,3,8),'fill'(2,6)
print 'polygon'(224,450,100,100,400,200,390,390)
```
