Ticket #10889: trac_10889_review-sl.patch

File trac_10889_review-sl.patch, 937 bytes (added by slabbe, 2 years ago)

Applies over the precedent patch

  • sage/plot/text.py

    # HG changeset patch
    # User Sebastien Labbe <slabqc at gmail.com>
    # Date 1299608522 18000
    # Node ID 576c4fbb68464868b536da0aad12e509a49bab72
    # Parent  b1612b9bfc7ab5a33c56b75473d33dd4c3085c0a
    #10889: one doctest added by reviewer
    
    diff --git a/sage/plot/text.py b/sage/plot/text.py
    a b def text(string, xy, **options): 
    265265 
    266266    If ``axis_coords`` is ``True``, then the coordinates are ignored 
    267267    when calculating a bounding box.  See trac #10889. :: 
     268 
     269        sage: P = point([(2008, 167)]) 
     270        sage: print P.xmin(), P.xmax(), P.ymin(), P.ymax() 
     271        2007.0 2009.0 166.0 168.0 
     272        sage: P += text('Evolution', (0.5, 0.9), axis_coords=True) 
     273        sage: print P.xmin(), P.xmax(), P.ymin(), P.ymax() 
     274        2007.0 2009.0 166.0 168.0 
     275 
     276    :: 
    268277     
    269278        sage: plot(sin(x)+100, (x,100,110),ymin=98,ymax=102)+text('sin(x)',(0.5,0.9),axis_coords=True) 
    270279