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[0], range[1]))
p += text("$" + latex(f) + "$", (0, range[2] - (range[3] - range[2]) * 0.1), fontsize=30, rgbcolor=(1,0,0))
p.axes_range(range[0], range[1], range[2], range[3])
show(p, figsize=12)
What this does is create a function called "simpleplot" which will do the following:
Now, I can just do:
simpleplot(1/x)
And it gives me my output!