Some basic plots in Maple |
Here are some examples of basic plotting commands in Maple. Try them in your Maple window.
Did you remember to load the plots package via the
with(plots):
command? Also remember that you can
use the mouse to cut and paste commands
from your World-Wide Web browser into your Maple session.
plot(x^4+sin(Pi*x),x=-1..1);
This command plots
the graph of y = x4 + sin(x pi) for x between -1
and 1.
implicitplot(x^2+y^2=1,x=-1..1,y=-1..1);
This
command plots the unit circle defined implicitly by the
equation x2 + y2 = 1.
plot( [cos(t), sin(t), t=0..2*Pi] );
This command
plots the unit circle defined by the parametric equations x =
cos(t) and y = sin(t).
polarplot(1, t=0..2*Pi);
This command plots the
unit circle defined by the polar equation r = 1.
plot1:=polarplot(1, t=0..2*Pi):
This defines
plot1
to be a name for the preceding plot. You should
terminate such a command with a colon instead of the usual
semicolon in order to suppress the output--otherwise you will
get junk on the screen showing Maple's internal representation
of the plot structure.
display( [plot1, plot2] );
If you define two of the preceding plots as plot1
and
plot2
, then this command will show the two plots together
on the same set of axes.
plot( [ [1,2], [-3,4], [5,6] ] );
This command
plots two line segments, one from the point (1,2) to the
point (-3,4) and the second from the point (-3,4) to
the point (5,6).
polygonplot( [ [1,2], [-3,4], [5,6] ], color=blue);
This command plots a solid blue triangle with vertices
(1,2), (-3,4), and (5,6).
The last example shows the use of a plot option. You can modify plots by including a comma-separated list of plot options in the plot command.
Some basic plots in Maple |