Plotting Capabilities for Engineers
? Maplesoft, a division of Waterloo Maple Inc., 2008
Introduction
Maple contains an extensive set of visualization tools and options, including many plots and options commonly used by engineers. This Tips & Techniques document demonstrates how to create and customize your plots using interactive techniques and command options, with emphasis on options used in engineering contexts.
Constructing Plots in Maple
Plots can be created using both interactive, "clickable" technqiues and through plotting commands. In this Tips and Techniques, both methods will be presented.
Clickable Plotting
The clickable approach is based on using pointandclick tools such as menus and interactive assistants, rather than commands. No knowledge of Maple's syntax or the underlying commands is required to create 2D and 3D plots and animations when using this approach.
Example
Plot the function from 15 to 15 using a clickable plotting approach.
Action

Result

Enter the expression to be plotted.


(2.1.1.1) 

Right click on the expression and select Plots > Plot Builder. The interactive Plot Builder assistant will appear.
Change the range of the axis to to .


Click Plot.


Tip: The Plot Builder is a good choice if you know in advance options that you want to modify. You could also select Plots > 2D Plot, and then use context menus to change various options afterwards.
Command Plotting
The commandbased approach involves using Maple commands to produce the plots. Options can be added to the command to customize the final appearance of the plot. The plotting command can be incorporated into larger scripts and custom Maple procedures.
Example
Plot a simple function using a commandbased approach:
Plotting Features
Certain plotting features, such as the display command, are part of the plots package, so we will load the package below. This package contains a wide variety of specialized plots and options. For more details on the plots package, see its help page .
Feature

ClickableBased Approach

CommandBased Approach

Simple 2D Plot

Right click on the function below; select Plots > Plot Builder.
Change the range of from 0 to 2*Pi.
Click Plot.


Gridlines

Right click on the function below; select Plots > Plot Builder.
Ensure that the range of is from 0 to 2*Pi.
Click Plot.
Right click on the plot; select Axes > Toggle Gridlines.
Tip: When you click on the plot, the Plot toolbar will be visible above. You can click on the button to toggle the gridlines on and off.


Annotations
You can add annotations to your plot, such as titles, axis labels, legends, and more. Shown here are just some of the annotations you can make.

Right click on the function below; select Plots > Plot Builder.
Ensure that the range of is from 0 to 2*Pi.
Click Plot.
Right click on the plot and select Title > Add Title.
Name the plot Function Plot.
Right click on the plot and select Axes > Labels > Edit Vertical.
Name the vertical axis Value.
Tip: You can also add annotations to your plot using the Drawing tools. Click on your plot and select the toolbar, and then you can choose from several options to annotate your plot.


Logarithmic Scales

Right click on the function below; select Plots > Plot Builder.
Ensure that the range of is from 0 to 2*Pi.
Click on Options, and Advanced Settings in the Axes section.
Change the Mode for the unlabeled axis to Log.
Click Apply, and then click Plot.


Specialty Tickmarks

Right click on the function below; select Plots > Plot Builder.
Ensure that the range of is from 0 to 2*Pi.
Click on Options, and Advanced Settings in the Axes section.
Change the Tickmarks setting for theta to spacing(Pi,0).
Click Apply, and then click Plot.


Plot Multiple Expressions

Right click on the expressions below; select Plots > Plot Builder.
Ensure that the range of is from 0 to 2*Pi.
Click Plot.
Tip: To create a single plot with multiple expressions, you can also drag and drop expressions from different plots, or from your Maple document, onto the same set of axes.

Tip: To suppress the output of the assignments of A and B, you can place a colon at the end of your statement (as shown above).
Tip: The display command is used to display more than one plot on a set of axes. For more information on the display command, see its help page .

Dual Axes

Right click on the functions below, select Plots > Plot Builder.
Ensure that the range of is from 0 to 2*Pi; click Plot.
Right click on the plot; select Axes > Create second axis.
Right click on a curve (e.g. below, green) and select Axes > Move to second axis.


Specialized Plotting Examples
Built into Maple are a wide array of standard engineering plots. Below, some of these plots are illustrated.
Bode Plots
Bode plots are usually a combination of a Bode magnitude and a Bode phase plot. These plots show the transfer function or frequency response of a linear, timeinvariant system. To construct a Bode plot in Maple, define your DynamicSystems system object and use the BodePlot command.
The BodePlot and TransferFunction commands are part of the DynamicSystems package, so we will load the package below:

(4.1.1) 
Tip: Specialized Maple functions like BodePlot can still be customized with various plotting options, allowing you to add titles and change colors, and annotations, just as with any other Maple plot.
Root Locus Plots
Maple has the ability to plot the rootlocus of a system object with a builtin command. Below, we define our system and use the RootLocusPlot command to create the plot.

(4.2.1) 
The Dynamic Systems package also includes support for rootcontour plots, phase plots, and more. See ?DynamicSystems for more details.
Polar Plots
To plot polar functions in Maple, you simply define your function and plot it using the Plot Builder.
Action

Result

Enter the expression to be plotted.


(4.3.1) 

Right click on the expression and select Plot > Plot Builder. The interactive Plot Builder assistant will appear.
Choose 2D polar plot.
Change the range of the angle to to .


Click Plot.


Tip: See the Plotting Guide for information on all of Maple's builtin specialized plots.
Legal Notice: Maplesoft, a division of Waterloo Maple Inc. 2008. Maplesoft and Maple are trademarks of Waterloo Maple Inc. This application may contain errors and Maplesoft is not liable for any damages resulting from the use of this material.