Ticket #10291: trac_10291.patch

File trac_10291.patch, 1.2 KB (added by Mike Hansen, 12 years ago)
  • sage/plot/plot.py

    # HG changeset patch
    # User Mike Hansen <mhansen@gmail.com>
    # Date 1290208942 28800
    # Node ID 0b14d3687a094e0f76837890aabdb66c61667594
    # Parent  65f68e4ed0c15b6a904d3d2e04c00813806e9871
    #10291: Plots are changing if showed multiple times
    
    diff --git a/sage/plot/plot.py b/sage/plot/plot.py
    a b  
    18891888        For input parameters, see the documentation for the
    18901889        :meth:`show` method (this function accepts all except the
    18911890        transparent argument).
     1891
     1892        TESTS:
     1893
     1894        We verify that #10291 is fixed::
     1895
     1896          sage: p = plot(sin(x), (x, -2*pi, 2*pi))
     1897          sage: figure = p.matplotlib()
     1898          sage: axes_range = p.get_axes_range()
     1899          sage: figure = p.matplotlib()
     1900          sage: axes_range2 = p.get_axes_range()
     1901          sage: axes_range == axes_range2
     1902          True
    18921903        """
    1893 
    18941904        if not isinstance(ticks, (list, tuple)):
    18951905            ticks = (ticks, None)
    18961906
     
    19151925        xmax+=x_pad
    19161926        ymin-=y_pad
    19171927        ymax+=y_pad
    1918        
    1919         self.set_axes_range(xmin,xmax,ymin,ymax)
    1920        
     1928               
    19211929        global do_verify
    19221930        do_verify = verify
    19231931