Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168744
Image: ubuntu2004
### # Plot demo # Have x^2 as base and move it -1 and +1 on the x axis. ### # Make from x a variable x = var('x') # Create plot of x^2 p1 = plot(x^2, rgbcolor=(1,0,0)) # Move x^2 one left and one right p2 = plot((x-1)^2, rgbcolor=(0,1,0)) p3 = plot((x+1)^2) # Merge the 3 plots show(p1+p2+p3)
blaat
### # 5.3-11-c ### x = var('x') plot_1 = plot(3*x) plot_2 = plot(3*(x-4)) show(plot_1 + plot_2)
### # 5.3-11-d ### x = var('x') plot_1 = plot(x^2, xmin=-10) plot_2 = plot(((x+3)^2), xmin=-10) show(plot_1 + plot_2)
### # 5.3-11-d ### a = animate([sin(x + float(k)) for k in srange(0,2*pi,0.7)], xmin=0, xmax=2*pi, figsize=[2,1]) a.show()
a = animate([sin(x + float(k)) for k in srange(0,2*pi,0.3)], xmin=0, xmax=2*pi, figsize=[2,1]) a.show()