Ticket #7008: trac-7008-doctests.patch

File trac-7008-doctests.patch, 5.4 KB (added by jason, 10 years ago)

apply on top of previous patch

  • doc/en/tutorial/tour_algebra.rst

    # HG changeset patch
    # User Jason Grout <jason-sage@creativetrax.com>
    # Date 1254204343 18000
    # Node ID 6f79e87ccc86545e1607757e5c9a6c36ff0dc61b
    # Parent  db6a447a5c84a3fca211833dc605e7304ef557b6
    Fix doctests broken by #7008
    
    diff -r db6a447a5c84 -r 6f79e87ccc86 doc/en/tutorial/tour_algebra.rst
    a b  
    260260
    261261    sage: t = var('t')
    262262    sage: P = parametric_plot((cos(2*t) + 2*cos(t), 4*cos(t) - cos(2*t) ),\
    263     ...   0, 2*pi, rgbcolor=hue(0.9))
     263    ...   (t, 0, 2*pi), rgbcolor=hue(0.9))
    264264    sage: show(P)
    265265
    266266The individual components can be plotted using
     
    268268::
    269269
    270270    sage: t = var('t')
    271     sage: p1 = plot(cos(2*t) + 2*cos(t), 0, 2*pi, rgbcolor=hue(0.3))
    272     sage: p2 = plot(4*cos(t) - cos(2*t), 0, 2*pi, rgbcolor=hue(0.6))
     271    sage: p1 = plot(cos(2*t) + 2*cos(t), (t,0, 2*pi), rgbcolor=hue(0.3))
     272    sage: p2 = plot(4*cos(t) - cos(2*t), (t,0, 2*pi), rgbcolor=hue(0.6))
    273273    sage: show(p1 + p2)
    274274
    275275(For more on plotting, see :ref:`section-plot`.)
  • doc/en/tutorial/tour_plotting.rst

    diff -r db6a447a5c84 -r 6f79e87ccc86 doc/en/tutorial/tour_plotting.rst
    a b  
    7171::
    7272
    7373    sage: x = var('x')
    74     sage: parametric_plot((cos(x),sin(x)^3),0,2*pi,rgbcolor=hue(0.6))
     74    sage: parametric_plot((cos(x),sin(x)^3),(x,0,2*pi),rgbcolor=hue(0.6))
    7575
    7676You can combine several plots by adding them:
    7777
    7878::
    7979
    8080    sage: x = var('x')
    81     sage: p1 = parametric_plot((cos(x),sin(x)),0,2*pi,rgbcolor=hue(0.2))
    82     sage: p2 = parametric_plot((cos(x),sin(x)^2),0,2*pi,rgbcolor=hue(0.4))
    83     sage: p3 = parametric_plot((cos(x),sin(x)^3),0,2*pi,rgbcolor=hue(0.6))
     81    sage: p1 = parametric_plot((cos(x),sin(x)),(x,0,2*pi),rgbcolor=hue(0.2))
     82    sage: p2 = parametric_plot((cos(x),sin(x)^2),(x,0,2*pi),rgbcolor=hue(0.4))
     83    sage: p3 = parametric_plot((cos(x),sin(x)^3),(x,0,2*pi),rgbcolor=hue(0.6))
    8484    sage: show(p1+p2+p3, axes=false)
    8585
    8686A good way to produce filled-in shapes is to produce a list of
     
    173173::
    174174
    175175    sage: x, y, z = var('x, y, z')
    176     sage: implicit_plot3d(x^2 + y^2 + z^2 - 4, (-2, 2), (-2, 2), (-2, 2))
     176    sage: implicit_plot3d(x^2 + y^2 + z^2 - 4, (x,-2, 2), (y,-2, 2), (z,-2, 2))
    177177
    178178Here are some more examples:
    179179
  • doc/fr/tutorial/tour_algebra.rst

    diff -r db6a447a5c84 -r 6f79e87ccc86 doc/fr/tutorial/tour_algebra.rst
    a b  
    239239
    240240    sage: t = var('t')
    241241    sage: P = parametric_plot((cos(2*t) + 2*cos(t), 4*cos(t) - cos(2*t) ),\
    242     ...   0, 2*pi, rgbcolor=hue(0.9))
     242    ...   (t, 0, 2*pi), rgbcolor=hue(0.9))
    243243    sage: show(P)
    244244
    245245Les coordonnées individuelles peuvent être tracées en utilisant
     
    247247::
    248248
    249249    sage: t = var('t')
    250     sage: p1 = plot(cos(2*t) + 2*cos(t), 0, 2*pi, rgbcolor=hue(0.3))
    251     sage: p2 = plot(4*cos(t) - cos(2*t), 0, 2*pi, rgbcolor=hue(0.6))
     250    sage: p1 = plot(cos(2*t) + 2*cos(t), (t, 0, 2*pi), rgbcolor=hue(0.3))
     251    sage: p2 = plot(4*cos(t) - cos(2*t), (t, 0, 2*pi), rgbcolor=hue(0.6))
    252252    sage: show(p1 + p2)
    253253
    254254(Pour plus d'information sur le tracé de graphe, voir :ref:`section-plot`.)
  • doc/fr/tutorial/tour_plotting.rst

    diff -r db6a447a5c84 -r 6f79e87ccc86 doc/fr/tutorial/tour_plotting.rst
    a b  
    7272::
    7373
    7474    sage: x = var('x')
    75     sage: parametric_plot((cos(x),sin(x)^3),0,2*pi,rgbcolor=hue(0.6))
     75    sage: parametric_plot((cos(x),sin(x)^3),(x,0,2*pi),rgbcolor=hue(0.6))
    7676
    7777Différents graphiques peuvent se combiner sur une même image :
    7878
    7979::
    8080
    8181    sage: x = var('x')
    82     sage: p1 = parametric_plot((cos(x),sin(x)),0,2*pi,rgbcolor=hue(0.2))
    83     sage: p2 = parametric_plot((cos(x),sin(x)^2),0,2*pi,rgbcolor=hue(0.4))
    84     sage: p3 = parametric_plot((cos(x),sin(x)^3),0,2*pi,rgbcolor=hue(0.6))
     82    sage: p1 = parametric_plot((cos(x),sin(x)),(x,0,2*pi),rgbcolor=hue(0.2))
     83    sage: p2 = parametric_plot((cos(x),sin(x)^2),(x,0,2*pi),rgbcolor=hue(0.4))
     84    sage: p3 = parametric_plot((cos(x),sin(x)^3),(x,0,2*pi),rgbcolor=hue(0.6))
    8585    sage: show(p1+p2+p3, axes=false)
    8686
    8787Une manière commode de tracer des formes pleines est de préparer une
  • sage/calculus/desolvers.py

    diff -r db6a447a5c84 -r 6f79e87ccc86 sage/calculus/desolvers.py
    a b  
    231231        sage: sol = desolve_system([de1, de2], [x,y], ics=[0,1,2]); sol
    232232        [x(t) == -sin(t) + 1, y(t) == cos(t) + 1]
    233233        sage: solnx, solny = sol[0].rhs(), sol[1].rhs()
    234         sage: plot([solnx,solny],0,1)
    235         sage: parametric_plot((solnx,solny),0,1)
     234        sage: plot([solnx,solny],(0,1))
     235        sage: parametric_plot((solnx,solny),(0,1))
    236236
    237237    AUTHOR: Robert Bradshaw (10-2008)
    238238    """
     
    303303        sage: solnx, solny = map(SR, soln)
    304304        sage: RR(solnx(s=3))
    305305        1.28224001611973
    306         sage: P1 = plot([solnx,solny],0,1)
    307         sage: P2 = parametric_plot((solnx,solny),0,1)
     306        sage: P1 = plot([solnx,solny],(0,1))
     307        sage: P2 = parametric_plot((solnx,solny),(0,1))
    308308
    309309        Now type show(P1), show(P2) to view these.
    310310