Plotting a Polygon

Description

Sage command to plot a filled polygon with vertices $(1,2), (5,6), (6,4), (5,0), (3,0)$.

Sage Cell

Code

polygon([[1,2], [5,6], [6,4], [5,0], [3,0]])

Options

Option

Both the color of the polygon and the color of its boundaries can be set.

Code

polygon([[1,2], [5,6], [6,4], [5,0], [3,0]], color="yellow", edgecolor="red")

Tags

Primary Tags: two-dimensional plots

Secondary Tags:

Related Cells

Attribute

Permalink:

Author: T. Judson

Date: 09 Jul 2017 08:18

Submitted by: Tom Judson

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License