# HG changeset patch
# User J. H. Palmieri <palmieri@math.washington.edu>
# Date 1354945099 28800
# Node ID b8aa7b74fc102b36ebb47b5a0478126382c998ea
# Parent 5aa7d85e796e69a83e31d90a821a1ccea5ad44b1
import graphics_filename from the right place
diff --git a/sage/matrix/matrix_modn_sparse.pyx b/sage/matrix/matrix_modn_sparse.pyx
a
|
b
|
cimport matrix_dense |
85 | 85 | from sage.rings.finite_rings.integer_mod cimport IntegerMod_int, IntegerMod_abstract |
86 | 86 | |
87 | 87 | from sage.misc.misc import verbose, get_verbose |
88 | | from sage.misc.temporary_file import graphics_filename |
89 | 88 | |
90 | 89 | import sage.rings.all as rings |
91 | 90 | |
… |
… |
cdef class Matrix_modn_sparse(matrix_spa |
585 | 584 | direction of the resulting image. If None or a maxsize larger than |
586 | 585 | max(self.nrows(),self.ncols()) is given the image will have the |
587 | 586 | same pixelsize as the matrix dimensions (default: 512) |
| 587 | |
| 588 | EXAMPLES:: |
| 589 | |
| 590 | sage: M = Matrix(GF(7), [[0,0,0,1,0,0,0,0],[0,1,0,0,0,0,1,0]], sparse=True); M |
| 591 | [0 0 0 1 0 0 0 0] |
| 592 | [0 1 0 0 0 0 1 0] |
| 593 | sage: M.visualize_structure() |
588 | 594 | """ |
589 | 595 | import gd |
590 | 596 | import os |
… |
… |
cdef class Matrix_modn_sparse(matrix_spa |
637 | 643 | setPixel( (x,y), colorExact((r-delta,g-delta,b-delta)) ) |
638 | 644 | |
639 | 645 | if filename is None: |
640 | | filename = sage.misc.misc.graphics_filename() |
| 646 | filename = sage.misc.temporary_file.graphics_filename() |
| 647 | if sage.plot.plot.DOCTEST_MODE: |
| 648 | import os |
| 649 | filename = os.path.join(sage.misc.temporary_file.tmp_dir(), filename) |
641 | 650 | |
642 | 651 | im.writePng(filename) |
643 | 652 | |
diff --git a/sage/plot/animate.py b/sage/plot/animate.py
a
|
b
|
www.ffmpeg.org, or use 'convert' to prod |
378 | 378 | raise OSError, msg |
379 | 379 | else: |
380 | 380 | if not savefile: |
381 | | savefile = sage.misc.misc.graphics_filename(ext='gif') |
| 381 | savefile = sage.misc.temporary_file.graphics_filename(ext='gif') |
382 | 382 | if not savefile.endswith('.gif'): |
383 | 383 | savefile += '.gif' |
384 | 384 | savefile = os.path.abspath(savefile) |
… |
… |
please install it and try again.""" |
554 | 554 | if not savefile: |
555 | 555 | if output_format is None: |
556 | 556 | output_format = 'mpg' |
557 | | savefile = sage.misc.misc.graphics_filename(ext=output_format) |
| 557 | savefile = sage.misc.temporary_file.graphics_filename(ext=output_format) |
558 | 558 | else: |
559 | 559 | if output_format is None: |
560 | 560 | suffix = os.path.splitext(savefile)[1] |