How Do I
Plot Multiple Functions?
Using Commands
Using Plot Builder
Drag and Drop
Related Topics
Plotting Lists of Expressions
The following examples with the plot command provide a list of expressions to plot.
Note: In Maple, a list is denoted using [ ] square brackets.
Example: Plotting Sine and Cosine on Same Plot
Step
Description
Illustration
1
Type the following:
plot([sin, cos])
plotsin,cos
2
Example: Plotting x,x2 with Custom Color
plot([x,x^2],x=0..2,color=["DarkViolet","Red"])
plotx,x2,x=0..2,color=DarkViolet,Red
Press Enter.
Example: Plotting a Sequence
plot([seq(BesselJ(n,x),n=1..4)],x=0..2*Pi,filled)
plotseqBesselJn,x,n=1..4,x=0..2⋅Pi,filled
Example: Plotting Multiple 3-D Plots
This also works for 3-D plots:
plot3d([x,sin(x)*y], x=-2*Pi..2*Pi, y=-5..5)
plot3dx, sinx⋅y,x=−2⋅Pi..2⋅Pi,y=−5..5
Plotting Multiple Plot Structures
You can also combine multiple plot structures and display these together using the plots:-display command:
Example: Plotting Multiple Plot Structures Together
Type the following: plot1:= plot(sin):
Then, press Enter.
plot1≔plotsin:
plot2 := plot(cos, color="Niagara Green"):
plot2≔plotcos,color=Niagara Green:
3
plots:-display([plot1,plot2])
The plots:-display command also works on 3-D plots:
plot3≔plot3dsinx⋅y,x=−2⋅Pi..2⋅Pi,y=−5..5:
plot4≔plot3dy,x=−2⋅Pi..2⋅Pi,y=−5..5:
plots:-displayplot3,plot4
You can use the Plot Builder from the Context Panel to plot a list or sequence of expressions.
Here is the first from the previous section.
Example: Using Plot Builder to Plot Two Expressions
Type the following, and from the Context Panel, select Plot Builder:
sin(x),cos(x)
sinx,cosx
The plot is shown in the main window, and in the Plot Builder window you can change options.
If you select Show Command in the right panel, you can see the underlying command used to create this plot. (It's plots:-display.)
You can also combine multiple plots using drag and drop.
Example: Combining the Plots for sinx and sinx2
Type the following: sin(x)
Click sin(x) and, from the context panel, choose Plots > 2-D Plot.
sinx→
Type the following: sin(x/2)
sin x2:
Drag the expression sinx2 onto the existing plot of sinx.
The How Do I... topics cover the essentials for doing mathematics in Maple. Learn more about available tools and features, such as palettes and the context panel.
How Do I...
...Enter a Complex Number?
...Enter a Function?
...Enter a Matrix?
...Enter a Simple Expression?
...Evaluate an Expression?
...Import Tabular Data?
...Plot a Function?
...Plot a Straight Line?
...Solve an Ordinary Differential Equation?
...Work with Random Generators?
Tools and Features
Palettes
Context Panel
Command Completion
Equation Labels
Assistants
Maple Help
Plotting Guide
Applications
Example Worksheets
Manuals
Refer to Help>Quick Reference for basic Getting Started tips.
See Also
plot
Plotting Tutorial
Plot Builder
Setting Curve Colors
Download Help Document