OldPlots Color Palette - Maple Programming Help

Home : Support : Online Help : Graphics : Packages : ColorTools : Color Collections : ColorTools/Collection/OldPlots

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.

 > plot([x,x^3], x=-1..1, color=["OldPlots 2", "OldPlots Blue"]);
 > C := ColorTools:-Color("OldPlots 6");
 ${\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

 > plots:-setcolors("OldPlots"):

You can programatically access the colors using ColorTools commands

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