Am I plotting this function incorrectly?
Hi everyone,
Glad to getting started using Sage aspart of my uni course.
I have this function that I am plotting, but I am getting a wierd output with a specific range.
This gives reasonable output:
p = (x^3-7*x+2)/(cos(x)-1)
plot(p, (-5, -0.1))
But changing the range looks weird:
p = (x^3-7*x+2)/(cos(x)-1)
plot(p, (-5, 0))
I am doing this on SageCell. Is it Sage having issues plotting the above or me setting range/scale incorrectly?
Thanks a lot,
Per
Well, the value at 0 is
-oo
. You can truncate usingp.plot(ymax=20,ymin=-20)
.Thanks @fredericc, it solved my issue. It's just that, when comparing the graphs they don't seem to be the same function. Does plot() maybe set the scale automatically (to eg "loglog")?