Ticket #7808: trac-7808-axes-through-origin.patch

File trac-7808-axes-through-origin.patch, 1.2 KB (added by jason, 11 years ago)
  • sage/plot/plot.py

    # HG changeset patch
    # User Jason Grout <jason-sage@creativetrax.com>
    # Date 1276282284 18000
    # Node ID bfde5d0334aa9f69ce1b53ed793143f3d6b86b68
    # Parent  e545bf6aa125a9bc986d7e3f4f2f014d4bef4f27
    #7808: Make the axes go exactly through the origin, instead of the default rounding to the nearest pixel of horizontal/vertical lines.
    
    diff -r e545bf6aa125 -r bfde5d0334aa sage/plot/plot.py
    a b  
    16611661        for spine in subplot.spines.values():
    16621662            spine.set_color(self.__axes_color)
    16631663            spine.set_linewidth(self.__axes_width)
     1664
     1665            # Uncomment the following line if you want the axes to go
     1666            # exactly through the origin (but drawing another
     1667            # horizontal/vertical line through the origin may not!)
     1668
     1669            spine.set_snap(False)
     1670
     1671
     1672            # Uncomment the following line if you are okay with
     1673            # "fuzzy" axes, but then there won't be a huge glaring
     1674            # difference between the axes widths sometimes.
     1675           
     1676            # spine.set_antialiased(False)
    16641677       
    16651678
    16661679        if frame: