Robert M. Corless
Department of Applied Mathematics
University of Western Ontario
London, Canada

Copyright 2001 by Robert M. Corless
All rights reserved

Useful one-word commands 

Использование монокоманд

Plotting in Maple 

Графика в Maple

Two-dimensional plots 

Двумерная графика

> restart;

> plot( Zeta(t), t=-3..3, y=-3..3, discont=true, colour=black );

> alias( W=LambertW );

W

> plot( {W(x),W(-1,x)}, x=-0.5..1.5, y=-4..1, colour=black );

> plot( [t*exp(t), t, t=-4..1], view=[-0.5..1.5,-4..1], colour=black );

> plot( {seq(orthopoly[T](k,x),k=0..20)}, x=-1..1, y=-1..1, axes=BOXED, colour=black, scaling=CONSTRAINED, numpoints=101 );

> with( orthopoly ):
> plot( {seq( [T(2,t),T(k,t),t=-1..1], k=1..5) ,
seq( [T(2,t),-T(k,t),t=-1..1],k=1..5)}, view=[-1..1,-1..1], colour=black,
scaling=CONSTRAINED, axes=BOXED );

> plot( {seq( [T(2,t),T(k,t),t=-1..1], k=1..20) ,
seq( [T(2,t),-T(k,t),t=-1..1],k=1..20)}, view=[-1..1,-1..1], colour=black,
scaling=CONSTRAINED, axes=BOXED );

> restart;

> with(student):
> leftbox(1/(1+t), t=0..1, 6, colour=black );

[Maple Plot]

> restart;
> f := 1/(2+sin(theta));

f := 1/(2+sin(theta))

> a := n -> Int( f*cos(n*theta), theta=0..2*Pi )/Pi;

a := proc (n) options operator, arrow; Int(f*cos(n*...

> b := n -> Int( f*sin(n*theta), theta=0..2*Pi )/Pi;

b := proc (n) options operator, arrow; Int(f*sin(n*...

> Approx := N -> add( b(k)*sin(k*theta), k=1..N )
+add( a(k)*cos(k*theta), k=1..N ) + a(0)/2;

> err := evalf( f - Approx(5) ):

> plot( err, theta=0..2*Pi );

> restart;
> G := t -> frac(1/t);

G := proc (t) options operator, arrow; frac(1/t) en...

> plot( G, 0..1, 0..1, numpoints=101, colour=black );

> y := [ seq( k/10., k=0..10 ) ];

> y[11] := y[11] - Float(1,3-Digits);

y[11] := .999999900

> t := Vector[row]( 1..1100 ):
> for i to 100 do
for j to 11 do
t[(i-1)*11+j] := 1./(i+y[j]);
end do;
end do;
> gt := map( G, t ):
> gt_0 := map( G, t[1100-7..1100] );

> pts := zip( (x,y)->[x,y], t, gt ):
> whattype(pts);

Vector[row]

> plot( convert(pts,list), view=[0..1,0..1], colour=black );

> pieces := array(1..100):
> for i to 100 do
pieces[i] := NULL;
for j to 11 do
pieces[i] := pieces[i], 1./(1+y[j]), y[j];
end do;
pieces[i] := [pieces[i]];
end do:
> pieces := array(1..100):

> ys := [seq(y[j],j=1..11)]:

> for i to 100 do
pieces[i] := zip((i,j)->[i,j],[seq(1./(i+y[j]),j=1..11)],ys);
end do:
> plot( {seq(pieces[k],k=1..100)}, view=[0..1,0..1], colour=black);

> restart;
> with( plots, polarplot );

[polarplot]

> polarplot( {seq(cos(5*theta)+n*cos(theta),n=-5..5)},
theta=0..2*Pi, colour=black, axes=BOXED, scaling=CONSTRAINED);

> r := (n,theta) -> cos(5*theta) + n*cos(theta);

r := proc (n, theta) options operator, arrow; cos(5...

> plots[display]( [seq(plot( [r(n,t)*cos(t),r(n,t)*sin(t),t=0..2*Pi]) ,n=-5..5)],insequence=true);

> polarplot( (4*cos(3*theta)+cos(13*theta))/cos(theta), theta=0..2*Pi, colour=black, axes=BOXED );

> polarplot( (4*cos(theta)+cos(9*theta))/cos(theta), theta=0..2*Pi, colour=black, axes=BOXED );

> polarplot( exp(cos(theta))-2*cos(4*theta)+sin(theta/12)^5, theta=0..24*Pi, colour=black, axes=BOXED );

С официального разрешения                    © 2002 Waterloo Maple, Inc

 
Hosted by uCoz