OldPlots - Maple Help

# Online Help

###### All Products    Maple    MapleSim

OldPlots Color Palette

Description

 • The OldPlots palette is the selection of colors used as the default plot colors in older versions of Maple.
 > ColorTools:-DisplayPalette("OldPlots");

 1. Red 2. LimeGreen 3. Goldenrod 4. Blue 5. MediumOrchid 6. DarkTurquoise

Examples

You can reference colors in the palette by name or number in most commands that understand color names.

 > $\mathrm{plot}\left(\left[x,{x}^{3}\right],x=-1..1,\mathrm{color}=\left["OldPlots 2","OldPlots Blue"\right]\right)$
 > $C≔\mathrm{ColorTools}:-\mathrm{Color}\left("OldPlots 6"\right)$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{0.}{,}{0.80784314}{,}{0.81960784}\right]\right)$ (1)

You can make OldPlots the default palette in plots using setcolors

 > $\mathrm{plots}:-\mathrm{setcolors}\left("OldPlots"\right):$

You can programatically access the colors using ColorTools commands

 > $P≔\mathrm{ColorTools}:-\mathrm{GetPalette}\left("OldPlots"\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}}\right]{,}\left[{"Red"}{,}{"LimeGreen"}{,}{"Goldenrod"}{,}{"Blue"}{,}{"MediumOrchid"}{,}{"DarkTurquoise"}\right]{,}\left[{"Cyan"}{=}{"DarkTurquoise"}{,}{"Green"}{=}{"LimeGreen"}{,}{"Purple"}{=}{"MediumOrchid"}{,}{"Yellow"}{=}{"Goldenrod"}\right]{,}{\mathrm{palettename}}{=}{"OldPlots"}{,}{\mathrm{palettetype}}{=}{"dictionary"}\right)$ (2)
 > $P\left[1\right]$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{1.00000000}{,}{0.}{,}{0.}\right]{,}{\mathrm{caption}}{=}{"Red"}\right)$ (3)
 > $n≔\mathrm{numcolors}\left(P\right)$
 ${n}{≔}{6}$ (4)
 > $\mathrm{plot}\left(\left[\mathrm{seq}\left(\mathrm{sin}\left(x+\frac{i\mathrm{\pi }}{n}\right),i=1..n\right)\right],x=0..2\mathrm{\pi },\mathrm{axes}=\mathrm{boxed},\mathrm{color}=:-\mathrm{GetColors}\left(P\right)\left[1..n\right],\mathrm{legend}=:-\mathrm{GetColorNames}\left(P\right)\left[1..n\right],\mathrm{numpoints}=25,\mathrm{style}=\mathrm{line}\right)$
 > 

 See Also