Maple for making pictures
Copyright 2000-2005, SUNY Buffalo.
Plotting curves:
Graphs:
| > | plot(sin(x),x=0..10); |
![[Plot]](images/maple_for_pictures_1.gif)
Sepcifying a vertical range:
| > | plot(exp(x),x=0..10,0..10,labels=[foo,bar]); |
![[Plot]](images/maple_for_pictures_2.gif)
Plotting several graphs together:
| > | plot([sin(x),cos(x),cosh(x),sinh(x)],x=-2..2,color=[red,green,blue,black]); |
![[Plot]](images/maple_for_pictures_3.gif)
Parametric plane curves:
| > | plot([cos(t),sin(t),t=0..3/2*Pi],
scaling=constrained,axes=boxed,color=blue,thickness=3); |
![[Plot]](images/maple_for_pictures_4.gif)
Combining plots:
| > | p1:=plot([cos(t),sin(t),t=0..3/2*Pi],
scaling=constrained,axes=boxed,color=blue,thickness=3): p2:=plot([cos(t),sin(t)/2,t=0..3/2*Pi], scaling=constrained,axes=boxed,color=red, thickness=3): plots[display](p1,p2); |
![[Plot]](images/maple_for_pictures_5.gif)
Implicit plane curves:
| > | with(plots):
eqn:=sin(x*y)+x^2=1; implicitplot(eqn,x=-2..2,y=-2..2); |
![[Plot]](images/maple_for_pictures_7.gif)
Plotting discrete data:
| > | data:=[seq([(i/10),(i/10)^2],i=0..10 )];
plot( data ); |
![[Plot]](images/maple_for_pictures_9.gif)
| > | plot(data,style=point,symbol=diamond); |
![[Plot]](images/maple_for_pictures_10.gif)
Building pictures up from graphics primitives:
| > | l:=plottools[line]([1,2],[3,1],color=black,thickness=4);
s:=plottools[rectangle]([1,2],[3,4],color=red); p:=plottools[polygon]([seq([2+cos(2*Pi*i/5)/2,3+sin(2*Pi*i/5)/2],i=1..5)],color=blue); plots[display](p,s,l,scaling=constrained); |
![]()
![[Plot]](images/maple_for_pictures_15.gif)
Animation:
| > | circs:=seq(plottools[circle]([1,2],i/10),i=1..10):
plots[display](circs); plots[display](circs,insequence=true); |
![[Plot]](images/maple_for_pictures_16.gif)
![[Plot]](images/maple_for_pictures_17.gif)
| > |