-
-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Milestone
Description
#29935 discovered unstable plotting with doctests. This causes the following failures:
sage -t --long --random-seed=319106504607147180164974137764334084020 src/doc/en/prep/Symbolics-and-Basic-Plotting.rst # 2 doctests failed
sage -t --long --random-seed=319106504607147180164974137764334084020 src/doc/en/prep/Calculus.rst # 1 doctest failed
sage -t --long --random-seed=319106504607147180164974137764334084020 src/doc/en/thematic_tutorials/tutorial-notebook-and-help-long.rst # 1 doctest failed
sage -t --long --random-seed=319106504607147180164974137764334084020 src/doc/en/prep/Programming.rst # 1 doctest failed
sage -t --long --warn-long 85.2 --random-seed=123134235245245234 src/sage/combinat/sine_gordon.py # 1 doctest failed
In all of those instances, primitives where split into two (with a hole).
To reproduce
sage: f(x)=x^3+1
sage: set_random_seed(319106504607147180164974137764334084020)
sage: plot(1,(x,-1,1),color="red", linestyle="--")
Launched png viewer for Graphics object consisting of 1 graphics primitive
sage: plot(1,(x,-1,1),color="red", linestyle="--")
Launched png viewer for Graphics object consisting of 1 graphics primitive
sage: plot(1,(x,-1,1),color="red", linestyle="--")
Launched png viewer for Graphics object consisting of 2 graphics primitives
sage: set_random_seed(319106504607147180164974137764334084020)
sage: plot(cos(x),(x,0,pi/2),fill=True,ticks=[[0,pi/4,pi/2],None],tick_formatter=pi)
Launched png viewer for Graphics object consisting of 2 graphics primitives
sage: plot(cos(x),(x,0,pi/2),fill=True,ticks=[[0,pi/4,pi/2],None],tick_formatter=pi)
Launched png viewer for Graphics object consisting of 2 graphics primitives
sage: plot(cos(x),(x,0,pi/2),fill=True,ticks=[[0,pi/4,pi/2],None],tick_formatter=pi)
Launched png viewer for Graphics object consisting of 3 graphics primitives
sage: set_random_seed(319106504607147180164974137764334084020)
sage: plot(sin(x), (x,0,2*pi))
Launched png viewer for Graphics object consisting of 1 graphics primitive
sage: plot(sin(x), (x,0,2*pi))
Launched png viewer for Graphics object consisting of 1 graphics primitive
sage: plot(sin(x), (x,0,2*pi))
Launched png viewer for Graphics object consisting of 2 graphics primitives
sage: set_random_seed(319106504607147180164974137764334084020)
sage: plot([x^n for n in [2..6]],(x,0,1))
Launched png viewer for Graphics object consisting of 6 graphics primitives
sage: plot([x^n for n in [2..6]],(x,0,1))
Launched png viewer for Graphics object consisting of 5 graphics primitives
sage: set_random_seed(123134235245245234)
sage: Y = SineGordonYsystem('A',(6,4,3))
sage: Y.plot()
Launched png viewer for Graphics object consisting of 220 graphics primitives
sage: Y.plot()
Launched png viewer for Graphics object consisting of 221 graphics primitives
sage: Y.plot()
Launched png viewer for Graphics object consisting of 221 graphics primitives
sage: Y.plot()
Launched png viewer for Graphics object consisting of 219 graphics primitives
This is caused by #13246, which adds exclusion points in the plot, whenever two x-values are far apart. However, it seems more natural to actually keep track of those points where the computation failed.
Component: graphics
Keywords: plotting
Author: Jonathan Kliem
Branch/Commit: d6e51f3
Reviewer: Dave Morris
Issue created by migration from https://trac.sagemath.org/ticket/29954