 plot - Maple Programming Help

Home : Support : Online Help : Graphics : 2-D : plot : plot

plot

create a two-dimensional plot

 Calling Sequence plot(f, x) plot(f, x=x0..x1) plot(v1, v2)

Parameters

 f - expression in independent variable x x - independent variable x0, x1 - left and right endpoints of horizontal range v1, v2 - x-coordinates and y-coordinates

Description

 • The plot(f, x) calling sequence plots the real function f over a horizontal real range, which is normally $-2\mathrm{\pi }..2\mathrm{\pi }$ when f is a trigonometric function and $-10..10$ otherwise.
 • The plot(f, x=x0..x1) calling sequence plots the real function f over the horizontal real range from x0 to x1.
 • The plot(v1, v2) calling sequence creates a curve from the points with x-coordinates v1 and y-coordinates v2, where v1 and v2 are lists or Vectors.
 Note: The commonly used operator form of the calling sequence and other ways of specifying points are described in the plot/details help page. A complete list of available options can be found in the plot/options help page.

Types of Plots

 • For a pictorial listing of the available types of plots, as well as other resources for plotting, see the Plotting Guide.
 Note: This guide is only available in the Standard interface.

Interactive Plot Builder

 • Maple includes the Interactive Plot Builder, which provides a point-and-click interface to the plotting functionality including two and three-dimensional plots, animations, and interactive plots with sliders.
 To launch the Plot Builder, run the PlotBuilder command. You can also launch the Plot Builder in the Standard Worksheet from the Tools menu. Select Assistants, and then Plot Builder. For more information, see PlotBuilder and Using the Interactive Plot Builder.

Customizing Plots

 • You can customize displayed plots using the Context Panel. Select the plot and the Context Panel shows items for customizing the plot.  These can also be accessed via the Plot menu.

Examples

Plots Using Specified Range

 > $\mathrm{plot}\left(\mathrm{sin}\left(x\right),x=0..4\mathrm{\pi }\right)$ > $\mathrm{plot}\left(1-{x}^{2},x=-2..2\right)$ Plots Without Specified Range

 If no range is specified, Maple uses the default range ($-2\mathrm{\pi }..2\mathrm{\pi }$ for a trigonometric plot).
 > $\mathrm{plot}\left(\frac{\mathrm{sin}\left(t\right)}{1+{\left(\mathrm{exp}\left(t\right)\right)}^{2}},t\right)$ Otherwise, the default range is $-10..10$.
 > $\mathrm{plot}\left({x}^{3}+x\right)$ Plot Multiple Functions on the Same Graph

 > $\mathrm{plot}\left(\left[1,x,{x}^{2}\right],x=-2..2\right)$ > $\mathrm{plot}\left(\left[\mathrm{ln}\left(x\right),\mathrm{sqrt}\left(x\right),\mathrm{exp}\left(x\right)\right],x=-2..2,\mathrm{color}=\left["Red","Green","Blue"\right]\right)$ Point Plots

 > $\mathrm{plot}\left(\mathrm{Vector}\left(\left[1,3,4,6\right]\right),\mathrm{Vector}\left(\left[8,6,2,5\right]\right),\mathrm{style}=\mathrm{point},\mathrm{symbol}=\mathrm{asterisk},\mathrm{color}="Blue"\right)$ > $\mathrm{plot}\left(⟨⟨1,2,3,4,5,6⟩|⟨6,5,4,3,2,1⟩⟩,\mathrm{style}=\mathrm{point}\right)$ Interactive Plotting

 The PlotBuilder command lets you build and display plots interactively. To try it, run the following command in a worksheet and then click the area immediately below the command. Options for selecting the plot type and customizing the plot appear in the panel to the right of the Maple window.
 > $\mathrm{PlotBuilder}\left(\mathrm{abs}\left(\mathrm{cosh}\left(\frac{t}{5}\right)-2\right)+\frac{\mathrm{sin}\left({t}^{2}\right)}{10}\right)$
 The command to create the plot from the Plotting Guide is:
 > $\mathrm{plot}\left({\mathrm{cos}\left(2x-\frac{\mathrm{\pi }}{2}\right)}^{3}+2\mathrm{sin}\left(\frac{x}{2}\right),x=0..\mathrm{\pi }\right)$ Details

 For detailed information including:
 • Plotting multiple functions
 • Parametric plots
 • Plotting functions defined as procedures
 • Point plots
 • Specifying plot options in the calling sequence, including color, coordinate system, and title
 • Discontinuities
 • Specifying a vertical range
 • Using different interfaces and output devices
 see the plot/details help page.

Compatibility

 • The plot command was updated in Maple 2017.