Visualization - Maple Help

Visualization

Maple 2020 includes the following visualization updates.

Plot size

The default plot size for 2-D and 3-D plots is bigger.

$\frac{\mathrm{sin}\left({x}^{2}\right)}{x}$$\to$

In addition, the size option is now supported for 3-D plotting commands.  This allows for specifying precise and consistent dimensions for the plotting window that encapsulates inline 3-D plots. This geometry is respected upon export of the plot to an image file.

The size option is also supported by the plots:-display command for combining multiple 3-D plots.

The following plot has also been manually zoomed and panned.



Legends for 2-D contour plots

The plots:-contourplot command's support for the legend option now allows for both automatic generated and customized legend entries to display the values of the contour lines.

$\mathrm{with}\left(\mathrm{plots}\right):$

When supplied as a list the number of legend entries must match the requested number of contour lines.  The contour values can be numerically formatted.

The special name contourvalue can be used within a typeset formula.

The special value "null" can be used to suppress the legend entry for particular contours.

The new adaptmesh option of the plot3d command provides for automatic adjustment of the independent values of the data points in order to display smoother edges for surfaces which are non-numeric in some part of the specified rectangular domain.

In previous releases, the surface appeared as it now does with the option given as adaptmesh=false. The new default behavior is adaptmesh=true. In the following two graphs, the default behavior in Maple 2020 is shown on the right.

With the option set to true the result contains a MESH structure, while with the option set to false the result contains a GRID structure.

The data values can still be extracted using the plottools:-getdata command.

 ${\mathrm{GRID}}{,}{\mathrm{MESH}}$ (3.1)

$\mathrm{interface}\left(\mathrm{rtablesize}=3\right):$

$\mathrm{plottools}:-\mathrm{getdata}\left(\mathrm{old}\right);$

$\mathrm{plottools}:-\mathrm{getdata}\left(\mathrm{new}\right);$

$\mathrm{interface}\left(\mathrm{rtablesize}=10\right):$



plottools[triangulate]

The triangulate command takes a POLYGONS or POINTS structure and returns a POLYGONS structure containing a set of triangles which cover the region defined by its input.

$\mathrm{pts}≔\left[\left[391,374\right],\left[240,431\right],\left[252,340\right],\left[374,320\right],\left[289,214\right],\left[134,390\right],\left[68,186\right],\left[154,259\right],\left[161,107\right],\left[435,108\right],\left[208,148\right],\left[295,160\right],\left[421,212\right],\left[441,303\right]\right]:$

$P≔\mathrm{plottools}:-\mathrm{polygon}\left(\mathrm{pts}\right):$

$Q≔\mathrm{plottools}:-\mathrm{triangulate}\left(P,\mathrm{style}=\mathrm{line}\right)$

 ${\mathrm{POLYGONS}}{}\left(\left[\begin{array}{cc}391.0& 374.0\\ 240.0& 431.0\\ 252.0& 340.0\end{array}\right]{,}\left[\begin{array}{cc}161.0& 107.0\\ 435.0& 108.0\\ 208.0& 148.0\end{array}\right]{,}\left[\begin{array}{cc}208.0& 148.0\\ 295.0& 160.0\\ 421.0& 212.0\end{array}\right]{,}\left[\begin{array}{cc}421.0& 212.0\\ 441.0& 303.0\\ 391.0& 374.0\end{array}\right]{,}\left[\begin{array}{cc}154.0& 259.0\\ 161.0& 107.0\\ 208.0& 148.0\end{array}\right]{,}\left[\begin{array}{cc}391.0& 374.0\\ 252.0& 340.0\\ 374.0& 320.0\end{array}\right]{,}\left[\begin{array}{cc}134.0& 390.0\\ 68.0& 186.0\\ 154.0& 259.0\end{array}\right]{,}\left[\begin{array}{cc}134.0& 390.0\\ 154.0& 259.0\\ 208.0& 148.0\end{array}\right]{,}\left[\begin{array}{cc}289.0& 214.0\\ 134.0& 390.0\\ 208.0& 148.0\end{array}\right]{,}\left[\begin{array}{cc}421.0& 212.0\\ 391.0& 374.0\\ 374.0& 320.0\end{array}\right]{,}\left[\begin{array}{cc}289.0& 214.0\\ 208.0& 148.0\\ 421.0& 212.0\end{array}\right]{,}\left[\begin{array}{cc}421.0& 212.0\\ 374.0& 320.0\\ 289.0& 214.0\end{array}\right]{,}{\mathrm{STYLE}}{}\left({\mathrm{LINE}}\right)\right)$ (4.1)



ColorTools:-CVDSimulation

CVDSimulation in the ColorTools package is a new command that returns how a color could be perceived by a viewer with a specific color vision deficiency.

 > $\mathrm{with}\left(\mathrm{ColorTools}\right):$
 > $P≔\mathrm{GetPalette}\left("CVD"\right)$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Palette}}{}\left(\left[{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}\right]{,}\left[{"Green Blue"}{,}{"Yellow"}{,}{"Pale Purple"}{,}{"Green"}{,}{"Blue"}{,}{"Red"}{,}{"Pale Orange"}{,}{"Light Blue"}{,}{"Orange"}{,}{"Pale Green"}{,}{"Purple"}{,}{"Light Green Blue"}\right]{,}\left[{}\right]{,}{\mathrm{palettename}}{=}{"CVD"}{,}{\mathrm{palettetype}}{=}{"fill"}\right)$ (5.1)
 > $\mathrm{CVDSimulation}~\left(P,"deuteranomaly"\right)$
 > $\mathrm{CVDSimulation}~\left(P,"protanomaly"\right)$
 > $\mathrm{CVDSimulation}~\left(P,"tritanomaly"\right)$