Plotting Capabilities for Engineers
Go to Maple Portal Maple Portal for Engineers

Introduction


Maple contains an extensive set of visualization tools and options, including many plots and options commonly used by engineers. This document demonstrates how to create and customize your plots using interactive techniques and command options, with an emphasis on options useful in a engineering context.


Constructing Plots in Maple


Plots can be created using both interactive, "clickable" techniques and through plotting commands. Both of these methods are demonstrated here.

Clickable Plotting


The clickable approach is based on using pointandclick tools such as menus and interactive assistants, rather than commands. Using this approach is possible even without knowledge of Maple's syntax or the underlying commands.

Example


Plot the function from 15 to 15 using a clickable plotting approach.
Action

Result

Enter the expression to be plotted.

 (1) 

Rightclick the expression and select Plots > Plot Builder. The interactive Plot Builder assistant appears.
Change the range of the axis to to .


Click Plot.




Tip: The Plot Builder is a good choice if you know in advance the options that you want to modify. Alternatively, you could also select Plots > 2D Plot, and then use the 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 begin by loading the package. This package contains a wide variety of specialized plots and options.
•

To load the plots package, from the Tools menu, select Load Package>Plots

Loading plots
Note: You can also load the package using the command with(plots):
Feature

ClickableBased Approach

CommandBased Approach

Simple 2D Plot

•

Rightclick an expression and select Plots > Plot Builder.

•

Change the range of to be from 0 to 2*Pi.



Tip

In the expression above, is the imaginary unit. It is entered from the Common Symbols palette.
The symbols , , and from that palette represent the imaginary unit. Warning: Simply typing "j" will be understood as the name j, not the imaginary unit.

Gridlines

•

Rightclick an expression and select Plots > Plot Builder.

•

Ensure that the range of is from 0 to 2*Pi.

•

Rightclick the plot; select Axes > Toggle Gridlines.

Tip: When you click the plot, the Plot toolbar will be visible above. You can click 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.

•

Rightclick an expression and select Plots > Plot Builder.

•

Ensure that the range of is from 0 to 2*Pi.

•

Rightclick the plot and select Title > Add Title.

•

Name the plot Function Plot.

•

Rightclick 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 your plot and select the
toolbar, and then you can choose from several options to annotate your plot.


Logarithmic Scales

•

Rightclick an expression and select Plots > Plot Builder.

•

Ensure that the range of is from 0 to 2*Pi.

•

Click Options, and Advanced Settings in the Axes section.

•

Change the Mode for the second, unlabeled axis to Log.

•

Click Apply, and then click Plot.



Specialty Tickmarks

•

Rightclick an expression and select Plots > Plot Builder.

•

Ensure that the range of is from 0 to 2*Pi.

•

Click 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

•

Begin with two expressions separated by a comma as shown. Rightclick and select Plots > Plot Builder.

•

Ensure that the range of is from 0 to 2*Pi.

Tip: To create a single plot with multiple expressions, you can also drag and drop expressions expressions from your document, or curves from separate plots, 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 display.

Dual Axes

•

Begin with two expressions separated by a comma. Rightclick and select Plots > Plot Builder.

•

Ensure that the range of is from 0 to 2*Pi; click Plot.

•

Rightclick the plot; select Axes > Create second axis.

•

Rightclick a curve (for example, the green curve) and select Axes > Move to second axis.







Specialized Plotting Examples


Built into Maple are a wide array of standard engineering plots such as Bode plots, rootlocus plots, and polar plots. See the Plotting Guide for information on all of Maple's builtin specialized plots.

Bode Plots


Bode plots are typically a combination of a magnitude plot and a phase plot. These plots provide us with information with regard to the frequency characteristic of a linear, timeinvariant system. The command used to construct a Bode plot belongs to the Dynamic Systems package. To begin, load this package. This enables you to access Dynamic System commands in the context menu.
In this example, we enter a transfer function for a continuous system and then graph the Bode plot for the system. We demonstrate the clickable approach. For more details about using the Dynamic Systems package, including both clickable and commandbased approaches, see Dynamic Systems in Maple.
•

To begin, load the Dynamic Systems package (Tools>Load Package>Dynamic Systems). This enables you to access Dynamic System commands in the context menu.

•

Enter the transfer function. Then, rightclick the transfer function and select DynamicSystems>Plots>Bode Plot.

Loading DynamicSystems
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 using another command from the DynamicSystems package. Simply load the package, enter the transfer function of the system, and create the rootlocus plot.
•

To begin, load the Dynamic Systems package (Tools>Load Package>Dynamic Systems). This enables you to access Dynamic System commands in the context menu.

•

Enter the transfer function. Then, rightclick the transfer function and select DynamicSystems>Plots>Root Locus Plot.

Loading DynamicSystems
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.

 (2) 

•

Rightclick the expression and select Plot > Plot Builder. The interactive Plot Builder assistant appears.



Click Plot.






Go to Maple Portal Maple Portal for Engineers
