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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : 2-D : Options : setcolors

plots

  

setcolors

  

set colors for 2-D plots

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

setcolors(colorlist)

Parameters

colorlist

-

(optional) a non-empty list of colors, one of the following strings: "default", "Default", "Nautical", "Niagara", "Spring", "Classic", or any ColorTools palette name.

Description

• 

The setcolors command sets the colors for curves in 2-D plots.  When multiple curves are plotted, the plotting command cycles through a default list of colors. This command allows you to see the current list or alter it.

• 

The colors in colorlist may be color names or structures as described in the plot/color help page.  The plot/colornames help page provides a list of all predefined HTML color names.

• 

If colorlist is a non-empty list of colors, then the current list of colors is set to colorlist.  If colorlist is the string "default" or "Default", then the current list of colors is reset to default colors. If colorlist is the string "Classic", then the list of colors used in Maple 15 and earlier versions is used. In all cases, the previously saved list is returned.

• 

You can also provide any palette name understood by the ColorTools package as colorlist.  The default used for 2-D plotting is the Niagara palette. The Nautical and Spring palettes are also recommended for plotting curves.

• 

If you wish to use an alternative to the default palette every time you run Maple, it is recommended that you put the plots:-setcolors call in your Maple initialization file. (See Create Maple Initialization File for more information.)

• 

If setcolors is called with no arguments, then the current list is returned unchanged.

Examples

withplots:

View the current colors.

setcolors

#78000E,#000E78,#4A7800,#3E578A,#780072,#00786A,#604191,#004A78,#784C00,#91414A,#3E738A,#78003B,#00783F,#914186

(1)

Define a new list of colors.

setcolorsBlueViolet,Coral

#78000E,#000E78,#4A7800,#3E578A,#780072,#00786A,#604191,#004A78,#784C00,#91414A,#3E738A,#78003B,#00783F,#914186

(2)

Plot a set of curves with the current colors.

plotseqi+sinx,i=1..4,x=0..4π

Set colors to the "Spring" palette, and plot a set of curves.

setcolorsSpring

BlueViolet,Coral

(3)

plotseqi+sinx,i=1..4,x=0..4π

Reset to the default colors.

setcolorsDefault

#0074CC,#CC0074,#74CC00,#00CCBE,#5800CC,#4B7EA6,#C1CC00,#CC004E,#0041CC,#4BA673,#CC7E00,#BE00CC,#00CC33,#00A7CC

(4)

Compatibility

• 

The plots[setcolors] command was updated in Maple 16.

See Also

ColorTools

maple

plot

plot/color

plot/colornames

plots

plots[setoptions]