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

Online Help

All Products    Maple    MapleSim


Plot Adaptive Options

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

plot(plotargs, adaptive=v, numpoints=n, sample=s)

Parameters

plotargs

-

arguments to the plot command

adaptive = v

-

(optional) option of the form adaptive = v, where v can be one of true, false, geometric, a non-negative integer, or (default) default

numpoints = n

-

(optional) option of the form numpoints = n, where n is a non-negative integer

sample = s

-

(optional) option of the form sample = s, where s is a list of numeric values

Description

• 

The adaptive = v option controls the algorithm used by the plot command to produce two-dimensional plots.

• 

The simplest algorithm is used when adaptive = false. In this case, if the sample option is used, it fully determines the set of points where the plot expression is evaluated (the numpoints option is ignored). If the sample option is not given, Maple selects n equidistant points in the plot domain, where n is given by the numpoints option (default: 200).

• 

When adaptive = true, an algorithm is used that adds more points where the curve deviates from a straight line. It starts with an initial set of points determined from the sample and/or numpoints options in the same way as the adaptive = false case. After that, every segment is subdivided if the angle it makes with the next segment (in either direction) is too small. This happens at most 6 times for each subinterval.

• 

When adaptive = v is used where v is a non-negative integer, then the algorithm from adaptive = true is used, but the maximum number of subdivisions per segment is v. Hence, adaptive = 0 is the same as adaptive = false and adaptive = 6 is the same as adaptive = true.

• 

When adaptive = geometric, Maple uses a different algorithm based on interval arithmetic together with an a posteriori geometric analysis based loosely on the RealBox object, which allows for the efficient recognition of discontinuities. Moreover, the curve on-screen is often more accurate than with the other possible values of the adaptive option, at least for non-parametric plots in the Cartesian coordinate system. While the adaptive = geometric option has higher overhead than the other values mentioned above, in most cases, the extra overhead is acceptable. However, in situations where you generate a large number of plots, such as animations assembled manually, you may wish to use adaptive = true instead.

  

The adaptive = geometric algorithm subdivides the interval into a number of subintervals. If the numpoints option is given, that number is used. Otherwise, if the size option specifies the horizontal plot window size in pixels, that number is used. Otherwise, it uses 400 as the default. The intervals are of equal width, unless the axis option specifies a logarithmic horizontal axis, in which case the intervals span an equal factor.

• 

The adaptive = default option is, as the name suggests, the default value for this option. It uses a blended strategy that by default selects adaptive = geometric, except in these circumstances:

– 

The object to be plotted can be an expression or a procedure. The adaptive = geometric algorithm cannot deal with nontrivial procedures, so for these, the adaptive = true algorithm is selected.

– 

Some special functions are not supported by the RealBox object. If these occur in the expression, then adaptive = true is used.

– 

For parametric plotting and non-Cartesian coordinate systems, the adaptive = geometric algorithm doesn't give optimal results, so adaptive = true is used.

– 

If the object to be plotted is a polynomial, then the adaptive = true algorithm generally does a very good job, so that is selected.

– 

If the expression to be plotted is very big (as measured by the length[shortname] command), then Maple selects the adaptive = true algorithm to prevent a noticeable slowdown.

• 

If adaptive = true is used, then Maple does not detect discontinuities by default. In this case, the discont option must be used for plot to detect discontinuities.

Examples

plotfloorxfloorx3,x=5..5

plotfloorxfloorx3,x=5..5,adaptive=true

plotfloorxfloorx3,x=5..5,adaptive=false

plotfloorxfloorx3,x=5..5,adaptive=true,discont

plotsin100x+cos10x,x=2π..2π,adaptive=true

plotsin100x+cos10x,x=2π..2π

plotsqrtsinx2,x=5..5,adaptive=false,numpoints=10

plotsqrtsinx2,x=5..5,adaptive=2,numpoints=10

plotsqrtsinx2,x=5..5,adaptive=true,numpoints=10

plotsqrtsinx2,x=5..5

plotx2+1+0.0125lnabs13x1,x=1..1.4,adaptive=true

plotx2+1+0.0125lnabs13x1,x=1..1.4

Compatibility

• 

The adaptive option was updated in Maple 2022.

See Also

plot

plot/discont