Draw - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Student[NumericalAnalysis]

 Draw
 create a plot of a certain aspect of an interpolation structure

 Calling Sequence Draw(p, opts)

Parameters

 p - a POLYINTERP structure opts - (optional) equation(s) of the form keyword=value where keyword is objects; objects to plot

Options

 • objects = list, ApproximateValue, BasisFunctions, DataPoints, ExactValue, Function, Interpolant
 Objects to draw.  By default, objects = [DataPoints, Interpolant, Function, ApproximateValue], assuming each of these objects is available.  If one of the objects in the default is not available, it will not be included in the plot.

Description

 • The Draw command plots different components of an interpolation structure.
 • By default, the Draw command plots the following objects: the data points, the approximate polynomial, the function, and the extrapolated points, as long as they are available.
 • If the option objects is provided, the Draw command will plot the specified objects.
 • The POLYINTERP structure is created using the PolynomialInterpolation command or the CubicSpline command.
 • The colors of each object in the plot can be specified using the SetColors mechanism.

Examples

 > $\mathrm{with}\left({\mathrm{Student}}_{\mathrm{NumericalAnalysis}}\right):$
 > $\mathrm{xy}≔\left[\left[0,1\right],\left[\frac{1}{2},1\right],\left[1,\frac{11}{10}\right],\left[\frac{3}{2},\frac{3}{4}\right],\left[2,\frac{7}{8}\right],\left[\frac{5}{2},\frac{9}{10}\right],\left[3,\frac{11}{10}\right],\left[\frac{7}{2},1\right]\right]$
 ${\mathrm{xy}}{≔}\left[\left[{0}{,}{1}\right]{,}\left[\frac{{1}}{{2}}{,}{1}\right]{,}\left[{1}{,}\frac{{11}}{{10}}\right]{,}\left[\frac{{3}}{{2}}{,}\frac{{3}}{{4}}\right]{,}\left[{2}{,}\frac{{7}}{{8}}\right]{,}\left[\frac{{5}}{{2}}{,}\frac{{9}}{{10}}\right]{,}\left[{3}{,}\frac{{11}}{{10}}\right]{,}\left[\frac{{7}}{{2}}{,}{1}\right]\right]$ (1)
 > $\mathrm{p1}≔\mathrm{PolynomialInterpolation}\left(\mathrm{xy},\mathrm{independentvar}='x',\mathrm{method}=\mathrm{lagrange}\right):$
 > $\mathrm{Draw}\left(\mathrm{p1}\right)$
 > $\mathrm{p2}≔\mathrm{CubicSpline}\left(\mathrm{xy},\mathrm{independentvar}='x'\right):$
 > $\mathrm{Draw}\left(\mathrm{p2}\right)$
 > $\mathrm{Draw}\left(\mathrm{p1},\mathrm{objects}='\mathrm{BasisFunctions}'\right)$