On Dec 18, 9:55 am, Hobus <josel...@gmail.com> wrote: > Why when I want to graph f=x^(1/3) I get the following error? > In this case, what should I do to get the complete graph? > > 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' >
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??? -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org