PLOT structure found - use plots[display] - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : System : Error Message Guide : PLOT structure found - use plots[display]

Error, (in plot) PLOT structure found -- use plots[display]

Error, (in plot3d) PLOT3D structure found -- use plots[display]

Error, (in ...) ... structure found -- use plots[display]

 Description These errors occur when a PLOT or PLOT3D data structure is given as an argument to plot, plot3d, or another plotting command.   PLOT and PLOT3D are low-level data structures that contain information about the various components of a plot (for example, points, lines, and plotting options). These data structures are produced by Maple plotting commands such as plot and plot3d, but they are not valid input parameters for these commands. Instead, use the plots[display] command, which can interpret these data structures and produce your plot.   Multiple plots can be drawn together by passing a set or list of PLOT or PLOT3D data structures to plots[display] (see the examples on this page).

Examples

Example 1: Generating two-dimensional plots
In this example, y1 and y2 are PLOT data structures. When either of these is passed as an argument to the plot command, an error is generated because plot does not accept PLOT data structures.

 > $\mathrm{y1}≔\mathrm{plot}\left(\mathrm{cos}\left(x\right),\mathrm{style}=\mathrm{line}\right)$
 > $\mathrm{y2}≔\mathrm{PLOT}\left(\mathrm{CURVES}\left(\left[\left[0,-1\right],\left[0,1\right],\left[3,0\right],\left[0,-1\right]\right]\right),\mathrm{COLOR}\left(\mathrm{RGB},0,0,1\right)\right)$
 > $\mathrm{plot}\left(\mathrm{y1},x=-1..1\right)$
 > $\mathrm{plot}\left(\mathrm{y2}\right)$

Solution:

Use the plots[display] function to generate the images for these plots.

 > $\mathrm{with}\left(\mathrm{plots}\right):$
 > $\mathrm{display}\left(\mathrm{y1}\right)$
 > $\mathrm{display}\left(\mathrm{y2}\right)$

The plots[display] function can display more than one plot. To do this, use a list or set of PLOT data structures.

 > $\mathrm{display}\left(\left[\mathrm{y1},\mathrm{y2}\right]\right)$

Example 2: Generating three-dimensional plots

As in the example above, an error is generated when a PLOT3D structure is given as an argument to plot3d.

 > $A≔\mathrm{plot3d}\left(\mathrm{sin}\left(x\cdot y\right),x=-\mathrm{Pi}..\mathrm{Pi},y=-\mathrm{Pi}..\mathrm{Pi}\right)$
 > $\mathrm{plot3d}\left(A\right)$
 > $H≔\mathrm{plot3d}\left(x\cdot y,x=-2..2,y=-2..2\right)$
 > $\mathrm{plot3d}\left(H\right)$

Solution:

Use the plots[display] function to display these three-dimensional plots.

 > $\mathrm{display}\left(A\right)$
 > $\mathrm{display}\left(H\right)$
 > $\mathrm{display}\left(\left\{A,H\right\}\right)$

 See Also