| Download
All published worksheets from http://sagenb.org
Project: sagenb.org published worksheets
Views: 168704Image: ubuntu2004
Sage's plotting tools are easy to learn. Let's try a simple plot.
As in Matlab, we can assign a plot to a variable. If we have assigned
plot1=plot(f(x)) and plot2=plot(g(x)),
we can display both plots on the same figure with three equivalent commands:
1) show(plot1+plot2)
2) plot1+plot2
3) figure=plot1+plot2
figure.show()
Let's try a multiplot figure using two of Sage's plot options:
thickness: changes the line thickness of a function
rgbcolor: specifies color as a mixture of pure red, green, blue. Syntax: (red,green,blue).
This figure highlights another neat capability: shape plotting. We'll explore this and adding text to figures in sageplotting1.