Visualization - Maple Help

Choosing the plotting domain

 • The plot and plot3d commands are now smarter than before about choosing the domain for the plot if you don't specify one. Before 2021, the domain would usually be $-10..10$ or, for trigonometric functions, $-2\mathrm{\pi }..2\mathrm{\pi }$. We analyze the expressions and then automatically select a domain that gives a more complete view of important graph features.
 • For example, for low degree polynomials, the domain is always centered on the axis of symmetry of the plot, and it includes the zeroes and extrema of these polynomials.
 > plot(x^2 - 6*x + 2);
 > plot(60*x + 6*x^2 - x^3);
 • Using the Explore command, you can easily see how the domain moves with the parameters. Note: To interact with the sliders in this example, you must open this help page as a Worksheet.
 > Explore(plot(a*x^2 + b*x + c), parameters = [a = -3. .. 3., b = -10. .. 10., c = -10. .. 10.], initialvalues = [a = 1, b = -3, c = -10], placement = right);

$\mathbf{a}$

$\mathbf{b}$

$\mathbf{c}$

 • For expressions where the value is nonreal for some (nontrivial) region of real arguments, Maple now tries to find a domain that shows part of the boundary. Previously, this example would show an empty plot.
 > plot3d(sqrt(x + 3*sin(y) - 100));
 • A plot of a rational function will generally show all singularities, roots, extrema, inflection points, and (if multiple rational functions are given) intersections between the curves. The following expression has an extremum around $x=-23$ and a root around $x=37$; its plot shows both of these features and all of the other features in between:
 > expr := (x^4 - 36*x^3 - 38*x^2 + 29*x + 47)/(3*x^3 + 19*x^2 - 35*x - 35):
 > fzeroes := fsolve(numer(expr));
 ${\mathrm{fzeroes}}{≔}{1.019512958}{,}{37.00478874}$ (1)
 > fextrema := fsolve(numer(diff(expr, x)));
 ${\mathrm{fextrema}}{≔}{-23.47834741}{,}{-1.240536151}$ (2)
 > finflections := fsolve(numer(diff(expr, x, x)));
 ${\mathrm{finflections}}{≔}{0.04228889565}{,}{7.844906662}$ (3)
 > fsingularities := fsolve(denom(expr));
 ${\mathrm{fsingularities}}{≔}{-7.657875681}{,}{-0.7384747503}{,}{2.063017098}$ (4)
 > ratplot := plot(expr, discont);
 > plots:-display( ratplot, plots:-pointplot([seq([x, expr], x in [fzeroes, fextrema, finflections])], color=red), plots:-pointplot([seq([x, 0], x in fsingularities)], color=blue), symbol=solidcircle);
 • If we show the expression $30-\frac{{x}^{2}}{30}$ in the same plot, there is an intersection point between the two curves near $x=-43$. This point is included, too.
 > plot({expr, 30 - x^2/30}, discont);

Units in point plots and polygon plots

 • The pointplot and polygonplot commands in the plots package, and their 3-D analogues pointplot3d and polygonplot3d, now accept units for their arguments:
 > with(plots):
 > location_data := [[0*Unit(s), 0*Unit(m)], [1*Unit(s), 1.02*Unit(m)], [2*Unit(s), 4.05*Unit(m)], [3*Unit(s), 8.96*Unit(m)]];
 ${\mathrm{location_data}}{≔}\left[\left[{0}{,}{0}\right]{,}\left[⟦{s}⟧{,}{1.02}{}⟦{m}⟧\right]{,}\left[{2}{}⟦{s}⟧{,}{4.05}{}⟦{m}⟧\right]{,}\left[{3}{}⟦{s}⟧{,}{8.96}{}⟦{m}⟧\right]\right]$ (5)
 > pointplot(location_data);
 • If multiple different units are being used, or if a particular unit is specified with the useunits option, then the correct unit conversion is applied.
 > location_data := [op(location_data), [4000*Unit(ms), 52.5*Unit(ft)]];
 ${\mathrm{location_data}}{≔}\left[\left[{0}{,}{0}\right]{,}\left[⟦{s}⟧{,}{1.02}{}⟦{m}⟧\right]{,}\left[{2}{}⟦{s}⟧{,}{4.05}{}⟦{m}⟧\right]{,}\left[{3}{}⟦{s}⟧{,}{8.96}{}⟦{m}⟧\right]{,}\left[{4000}{}⟦{\mathrm{ms}}⟧{,}{52.5}{}⟦{\mathrm{ft}}⟧\right]\right]$ (6)
 > pointplot(location_data);

Arrows

 • Many visualization commands use arrows, which, in previous versions were always drawn with an arrow head triangle at 45 degrees from the main shaft.  In scenes where the x-axis has a vastly different scale than the y-axis, this angle is not always ideal.  Maple 2021 takes into account an unconstrained view of the axes now, rendering better looking arrow heads.
 > plots[arrow](Vector([1, 20]), unconstrainedview = [0 .. 1, 0 .. 20]);
 > VectorCalculus[PlotVector](<1, 20>, ':-shape' = ':-arrow', ':-thickness' = 10, color = red, length = [1, relative], width = [0.1, relative]);
 • Additionally where many arrows show up on the same canvas, Maple 2021 automatically renders head proportions with the full scene view in mind, making plots with multiple arrows look much better.
 > Student[LinearAlgebra][VectorSumPlot](<1, 20>, <1, 1>, ':-show' = 1);
 > Student:-LinearAlgebra:-VectorSumPlot(<3, 20>, <-4, 4>, <1, 1>);