# HG changeset patch
# User Karl-Dieter Crisman <kcrisman@gmail.com>
# Date 1326319330 18000
# Node ID 8e1a67e214491427e28af97f0e8344765f041343
# Parent c51432ae5c9d3e816aee196baba5fd4559cd13df
Trac 11677 - reviewer patch adds doctests for fix
diff --git a/sage/plot/polygon.py b/sage/plot/polygon.py
a
|
b
|
|
275 | 275 | @options(alpha=1, rgbcolor=(0,0,1), thickness=None, legend_label=None, fill=True) |
276 | 276 | def polygon2d(points, **options): |
277 | 277 | r""" |
278 | | Returns a polygon defined by ``points``. |
| 278 | Returns a 2-dimensional polygon defined by ``points``. |
279 | 279 | |
280 | 280 | Type ``polygon.options`` for a dictionary of the default |
281 | 281 | options for polygons. You can change this to change |
… |
… |
|
288 | 288 | |
289 | 289 | sage: polygon2d([[1,2], [5,6], [5,0]], rgbcolor=(1,0,1)) |
290 | 290 | |
| 291 | By default, polygons are filled in, but we can make them |
| 292 | without a fill as well:: |
| 293 | |
| 294 | sage: polygon2d([[1,2], [5,6], [5,0]], fill=False) |
| 295 | |
| 296 | In either case, the thickness of the border can be controlled:: |
| 297 | |
| 298 | sage: polygon2d([[1,2], [5,6], [5,0]], fill=False, thickness=4, color='orange') |
| 299 | |
291 | 300 | Some modern art -- a random polygon, with legend:: |
292 | 301 | |
293 | 302 | sage: v = [(randrange(-5,5), randrange(-5,5)) for _ in range(10)] |