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 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

 > $\mathrm{plot}\left(\mathrm{floor}\left(x\right)-\mathrm{floor}\left(\frac{x}{3}\right),x=-5..5\right)$
 > $\mathrm{plot}\left(\mathrm{floor}\left(x\right)-\mathrm{floor}\left(\frac{x}{3}\right),x=-5..5,'\mathrm{adaptive}'=\mathrm{true}\right)$
 > $\mathrm{plot}\left(\mathrm{floor}\left(x\right)-\mathrm{floor}\left(\frac{x}{3}\right),x=-5..5,'\mathrm{adaptive}'=\mathrm{false}\right)$
 > $\mathrm{plot}\left(\mathrm{floor}\left(x\right)-\mathrm{floor}\left(\frac{x}{3}\right),x=-5..5,'\mathrm{adaptive}'=\mathrm{true},'\mathrm{discont}'\right)$
 > $\mathrm{plot}\left(\mathrm{sin}\left(100x\right)+\mathrm{cos}\left(10x\right),x=-2\mathrm{\pi }..2\mathrm{\pi },'\mathrm{adaptive}'=\mathrm{true}\right)$
 > $\mathrm{plot}\left(\mathrm{sin}\left(100x\right)+\mathrm{cos}\left(10x\right),x=-2\mathrm{\pi }..2\mathrm{\pi }\right)$
 > $\mathrm{plot}\left(\mathrm{sqrt}\left(\mathrm{sin}\left({x}^{2}\right)\right),x=-5..5,'\mathrm{adaptive}'=\mathrm{false},'\mathrm{numpoints}'=10\right)$
 > $\mathrm{plot}\left(\mathrm{sqrt}\left(\mathrm{sin}\left({x}^{2}\right)\right),x=-5..5,'\mathrm{adaptive}'=2,'\mathrm{numpoints}'=10\right)$
 > $\mathrm{plot}\left(\mathrm{sqrt}\left(\mathrm{sin}\left({x}^{2}\right)\right),x=-5..5,'\mathrm{adaptive}'=\mathrm{true},'\mathrm{numpoints}'=10\right)$
 > $\mathrm{plot}\left(\mathrm{sqrt}\left(\mathrm{sin}\left({x}^{2}\right)\right),x=-5..5\right)$
 > $\mathrm{plot}\left({x}^{2}+1+0.0125\mathrm{ln}\left(\mathrm{abs}\left(1-3\left(x-1\right)\right)\right),x=1..1.4,'\mathrm{adaptive}'=\mathrm{true}\right)$
 > $\mathrm{plot}\left({x}^{2}+1+0.0125\mathrm{ln}\left(\mathrm{abs}\left(1-3\left(x-1\right)\right)\right),x=1..1.4\right)$

Compatibility

 • The adaptive option was updated in Maple 2022.

 See Also
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 12, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://jp.maplesoft.com/support/help/maplesim/view.aspx?path=plot%2Fadaptive", "fetch_time": 1726062226000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2024-38/segments/1725700651387.63/warc/CC-MAIN-20240911120037-20240911150037-00798.warc.gz", "warc_record_offset": 303849949, "warc_record_length": 24935, "token_count": 1561, "char_count": 5910, "score": 3.640625, "int_score": 4, "crawl": "CC-MAIN-2024-38", "snapshot_type": "latest", "language": "en", "language_score": 0.7376692295074463, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00042-of-00064.parquet"}