Ticket #2900: trac_2900-imshow-save.patch

File trac_2900-imshow-save.patch, 886 bytes (added by kcrisman, 11 years ago)

Depends on #7059

  • sage/plot/plot.py

    # HG changeset patch
    # User Karl-Dieter Crisman <kcrisman@gmail.com>
    # Date 1254229866 14400
    # Node ID 5f6357f2e13c65675182be17e906d74f6ca935e9
    # Parent  53994a3a54273d2cbc62ad423373b580792d6917
    Verify that imshow problem in Trac 2900 is fixed in matplotlib
    
    diff -r 53994a3a5427 -r 5f6357f2e13c sage/plot/plot.py
    a b  
    218218    sage: grid(True)
    219219    sage: savefig(os.path.join(SAGE_TMP, 'sage.png'))
    220220
     221We test that ``imshow`` works as well, verifying that
     222Trac ticket 2900 is fixed in Matplotlib.
     223
     224::
     225
     226    sage: imshow([[(0,0,0)]])
     227    <matplotlib.image.AxesImage object at ...>
     228    sage: savefig(os.path.join(SAGE_TMP, 'foo.png'))
     229
    221230Since the above overwrites many Sage plotting functions, we reset
    222231the state of Sage, so that the examples below work!
    223232