I'm teaching calculus to some homeschool students this year, and I wanted to have a bunch of function plots printed out to show them. Therefore, I turned to Sage, which I have never used. It is great! You have to know a few other math software pieces to really understand it, but it's not that bad. Someone needs to do a general "how to use sage", and some day I might.
Anyway, here's my quick function for plotting graphs for students that some of you might like.
In one of the evaluation boxes, type the following:
def simpleplot(f, range=(-5,5,-5,5)):
p = plot(f, (x, range, range))
p += text("$" + latex(f) + "$", (0, range - (range - range) * 0.1), fontsize=30, rgbcolor=(1,0,0))
p.axes_range(range, range, range, range)
What this does is create a function called "simpleplot" which will do the following:
Now, I can just do:
And it gives me my output!