Ticket #11677: trac_11677-reviewer.patch

File trac_11677-reviewer.patch, 1.2 KB (added by kcrisman, 10 years ago)

apply after fix fill patch

  • sage/plot/polygon.py

    # 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  
    275275@options(alpha=1, rgbcolor=(0,0,1), thickness=None, legend_label=None, fill=True)
    276276def polygon2d(points, **options):
    277277    r"""
    278     Returns a polygon defined by ``points``.
     278    Returns a 2-dimensional polygon defined by ``points``.
    279279
    280280    Type ``polygon.options`` for a dictionary of the default
    281281    options for polygons.  You can change this to change
     
    288288
    289289        sage: polygon2d([[1,2], [5,6], [5,0]], rgbcolor=(1,0,1))
    290290
     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
    291300    Some modern art -- a random polygon, with legend::
    292301
    293302        sage: v = [(randrange(-5,5), randrange(-5,5)) for _ in range(10)]