sage: plot(x^(1/3),x,-1,1)
verbose 0 (2999: plot.py, generate_plot_points) WARNING: When
plotting,
failed to evaluate function at 100 points.
verbose 0 (2999: plot.py, generate_plot_points) Last error message:
'negative number to a fractional power not real'
And the graph goes wrong
Greetings
There is some documentation at the end of
sage: plot?
that should cover this. Consistent with other similar programs (still
true, right?), we let (-1)^(1/3) be e^(pi*I/3), which can't be plotted
in this sense.
However, the graph itself is correct. You may be confused by the
axes; we typically try to have the axes not cross if the plotted
points are not close enough to the origin, which will usually be true
(there is some randomization) in this case, since you did not end at
x=0. The usual way to fix this is
sage: plot(x^(1/3),x,0,1)
I hope this helps!
- kcrisman
PS to sage-devel types:
sage: plot(x^(1/3),x,0,1) # still that annoying one-pixel thing -
where is it coming from???
1) turn off verbose
set_verbose(-1)
f(x) = x^(1/3)
plot(f(x),(-5,5))
2) Don't plot negative
f(x) = x^(1/3)
plot(f(x),(0,5))
-d