Skip to content

Commit 44f3ec5

Browse files
author
Matthias Koeppe
committed
src/sage/plot: sage -fixdoctests --only-tags, use more block tags
1 parent 9f6c58c commit 44f3ec5

File tree

15 files changed

+579
-529
lines changed

15 files changed

+579
-529
lines changed

src/sage/plot/animate.py

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# sage.doctest: optional - sage.symbolic
1+
# sage.doctest: needs sage.symbolic
22
r"""
33
Animated plots
44
@@ -526,27 +526,28 @@ def graphics_array(self, ncols=3):
526526
527527
EXAMPLES::
528528
529-
sage: E = EllipticCurve('37a') # optional - sage.schemes
530-
sage: v = [E.change_ring(GF(p)).plot(pointsize=30) # optional - sage.rings.finite_rings sage.schemes
529+
sage: # needs sage.schemes
530+
sage: E = EllipticCurve('37a')
531+
sage: v = [E.change_ring(GF(p)).plot(pointsize=30)
531532
....: for p in [97, 101, 103]]
532-
sage: a = animate(v, xmin=0, ymin=0, axes=False) # optional - sage.rings.finite_rings sage.schemes
533-
sage: print(a) # optional - sage.rings.finite_rings sage.schemes
533+
sage: a = animate(v, xmin=0, ymin=0, axes=False)
534+
sage: print(a)
534535
Animation with 3 frames
535-
sage: a.show() # optional -- ImageMagick # optional - sage.rings.finite_rings sage.schemes
536+
sage: a.show() # optional - imagemagick
536537
537538
Modify the default arrangement of array::
538539
539-
sage: g = a.graphics_array(); print(g) # optional - sage.rings.finite_rings sage.schemes
540+
sage: g = a.graphics_array(); print(g) # needs sage.schemes
540541
Graphics Array of size 1 x 3
541-
sage: g.show(figsize=[6,3]) # optional - sage.rings.finite_rings sage.schemes
542+
sage: g.show(figsize=[6,3]) # needs sage.schemes
542543
543544
Specify different arrangement of array and save it with a given file name::
544545
545-
sage: g = a.graphics_array(ncols=2); print(g) # optional - sage.rings.finite_rings sage.schemes
546+
sage: g = a.graphics_array(ncols=2); print(g) # needs sage.schemes
546547
Graphics Array of size 2 x 2
547-
sage: f = tmp_filename(ext='.png'); print(f) # optional - sage.rings.finite_rings sage.schemes
548+
sage: f = tmp_filename(ext='.png'); print(f) # needs sage.schemes
548549
...png
549-
sage: g.save(f) # optional - sage.rings.finite_rings sage.schemes
550+
sage: g.save(f) # needs sage.schemes
550551
551552
Frames can be specified as a generator too; it is internally converted to a list::
552553
@@ -852,18 +853,20 @@ def show(self, delay=None, iterations=None, **kwds):
852853
853854
You can also make use of the HTML5 video element in the Sage Notebook::
854855
855-
sage: a.show(format="ogg") # long time # optional -- ffmpeg
856-
sage: a.show(format="webm") # long time # optional -- ffmpeg
857-
sage: a.show(format="mp4") # long time # optional -- ffmpeg
858-
sage: a.show(format="webm", iterations=1) # long time # optional -- ffmpeg
856+
sage: # long time, optional - ffmpeg
857+
sage: a.show(format="ogg")
858+
sage: a.show(format="webm")
859+
sage: a.show(format="mp4")
860+
sage: a.show(format="webm", iterations=1)
859861
860862
Other backends may support other file formats as well::
861863
862-
sage: a.show(format="flash") # long time # optional -- ffmpeg
863-
sage: a.show(format="matroska") # long time # optional -- ffmpeg
864-
sage: a.show(format="avi") # long time # optional -- ffmpeg
865-
sage: a.show(format="wmv") # long time # optional -- ffmpeg
866-
sage: a.show(format="quicktime") # long time # optional -- ffmpeg
864+
sage: # long time, optional - ffmpeg
865+
sage: a.show(format="flash")
866+
sage: a.show(format="matroska")
867+
sage: a.show(format="avi")
868+
sage: a.show(format="wmv")
869+
sage: a.show(format="quicktime")
867870
868871
TESTS:
869872
@@ -1163,22 +1166,23 @@ def save(self, filename=None, show_path=False, use_ffmpeg=False, **kwds):
11631166
Ensure that we can pass delay and iteration count to the saved
11641167
GIF image (see :trac:`18176`)::
11651168
1166-
sage: a.save(td + 'wave.gif') # long time # optional -- ImageMagick
1167-
sage: with open(td + 'wave.gif', 'rb') as f: # long time # optional -- ImageMagick
1169+
sage: # long time, optional - imagemagick
1170+
sage: a.save(td + 'wave.gif')
1171+
sage: with open(td + 'wave.gif', 'rb') as f:
11681172
....: print(b'GIF8' in f.read())
11691173
True
1170-
sage: with open(td + 'wave.gif', 'rb') as f: # long time # optional -- ImageMagick
1174+
sage: with open(td + 'wave.gif', 'rb') as f:
11711175
....: print(b'!\xff\x0bNETSCAPE2.0\x03\x01\x00\x00\x00' in f.read())
11721176
True
1173-
sage: a.save(td + 'wave.gif', delay=35) # long time # optional -- ImageMagick
1174-
sage: with open(td + 'wave.gif', 'rb') as f: # long time # optional -- ImageMagick
1177+
sage: a.save(td + 'wave.gif', delay=35)
1178+
sage: with open(td + 'wave.gif', 'rb') as f:
11751179
....: print(b'GIF8' in f.read())
11761180
True
1177-
sage: a.save(td + 'wave.gif', iterations=3) # long time # optional -- ImageMagick
1178-
sage: with open(td + 'wave.gif', 'rb') as f: # long time # optional -- ImageMagick
1181+
sage: a.save(td + 'wave.gif', iterations=3)
1182+
sage: with open(td + 'wave.gif', 'rb') as f:
11791183
....: print(b'!\xff\x0bNETSCAPE2.0\x03\x01\x00\x00\x00' in f.read())
11801184
False
1181-
sage: with open(td + 'wave.gif', 'rb') as f: # long time # optional -- ImageMagick
1185+
sage: with open(td + 'wave.gif', 'rb') as f:
11821186
....: check1 = b'!\xff\x0bNETSCAPE2.0\x03\x01\x02\x00\x00'
11831187
....: check2 = b'!\xff\x0bNETSCAPE2.0\x03\x01\x03\x00\x00'
11841188
....: data = f.read()

src/sage/plot/arrow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def arrow2d(tailpoint=None, headpoint=None, path=None, **options):
586586
587587
A pretty circle of arrows::
588588
589-
sage: sum(arrow2d((0,0), (cos(x),sin(x)), hue=x/(2*pi)) # optional - sage.symbolic
589+
sage: sum(arrow2d((0,0), (cos(x),sin(x)), hue=x/(2*pi)) # needs sage.symbolic
590590
....: for x in [0..2*pi, step=0.1])
591591
Graphics object consisting of 63 graphics primitives
592592

src/sage/plot/bezier_path.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ def plot3d(self, z=0, **kwds):
168168
EXAMPLES::
169169
170170
sage: b = bezier_path([[(0,0),(0,1),(1,0)]])
171-
sage: A = b.plot3d() # optional - sage.symbolic
172-
sage: B = b.plot3d(z=2) # optional - sage.symbolic
173-
sage: A + B # optional - sage.symbolic
171+
sage: A = b.plot3d() # needs sage.symbolic
172+
sage: B = b.plot3d(z=2) # needs sage.symbolic
173+
sage: A + B # needs sage.symbolic
174174
Graphics3d Object
175175
176176
.. PLOT::
@@ -182,7 +182,7 @@ def plot3d(self, z=0, **kwds):
182182
183183
::
184184
185-
sage: bezier3d([[(0,0,0),(1,0,0),(0,1,0),(0,1,1)]]) # optional - sage.symbolic
185+
sage: bezier3d([[(0,0,0),(1,0,0),(0,1,0),(0,1,1)]]) # needs sage.symbolic
186186
Graphics3d Object
187187
188188
.. PLOT::

0 commit comments

Comments
 (0)