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

Online Help

All Products    Maple    MapleSim

Visualization updates in 2021


Choosing the plotting domain

Units in point plots and polygon plots


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π..2π. 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);






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



fextrema := fsolve(numer(diff(expr, x)));



finflections := fsolve(numer(diff(expr, x, x)));



fsingularities := fsolve(denom(expr));



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 30x230 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:


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)]];





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)]];






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

greens := ColorTools:-AnalogousSpread("Green", 360/10+1):

plots:-display( { seq(
,i=1..360,10) } );