Skip to content

Commit a3be810

Browse files
author
Release Manager
committed
Trac #10980: Make sure symbolic gridline values are okay
From [http://ask.sagemath.org/question/454/can-gridlines-be-painted-at- sqrt2 this ask.sagemath.org question]. {{{ plot(x,0,2,gridlines=([sqrt(2)],[])) }}} blows up. The fix is probably to make sure that symbolic input with a `n()` method passes something right to matplotlib, which of course cannot handle `sqrt(2)`. Possibly beginner ticket. Note: A beginner who is interested in working on this ticket can skip down to comment:13. URL: https://trac.sagemath.org/10980 Reported by: kcrisman Ticket author(s): Atte Niemi Reviewer(s): Dave Morris
2 parents b860a83 + 702d272 commit a3be810

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/sage/plot/plot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,11 @@ def f(x): return (x-3)*(x-5)*(x-7)+40
518518
sage: os.system("sage -c \"if 'matplotlib' in sys.modules: sys.exit(1)\"") # long time
519519
0
520520
521+
Verify that :trac:`10980` is fixed::
522+
523+
sage: plot(x,0,2,gridlines=([sqrt(2)],[]))
524+
Graphics object consisting of 1 graphics primitive
525+
521526
AUTHORS:
522527
523528
- Alex Clemesha and William Stein (2006-04-10): initial version

0 commit comments

Comments
 (0)