|
Plot Color Option
|
|
Calling Sequence
|
|
plotcommand(plotargs, color=c)
plotcommand(plotargs, colour=c)
|
|
|
Parameters
|
|
|
plotcommand
|
-
|
any plotting command such as plot or plot3d that accepts the color option
|
|
plotargs
|
-
|
arguments to the plot command
|
|
c
|
-
|
string representing a color name, a color data structure, a procedure, or an expression
|
|
|
|
|
|
Description
|
|
|
•
|
The color of a plot can be specified by a string or a color data structure. Some 3-D plotting commands can also accept a color option value in the form of a procedure or expression.
|
|
•
|
The strings that can be given directly to a plotting command are those from the "HTML" color palette. To see a list of all colors in this palette, issue the command ColorTools:-GetPalette("HTML"). See the ColorTools:-GetPalette help page for more information. "HTML".
|
|
•
|
Colors from other palettes understood by Maple can also be used by adding the palette name as a prefix in the string passed to the plotting command. For example, to generate a curve with the "Violet" color from the "Spring" palette, use the option color="Spring Violet". The ColorTools:-PaletteNames command gives a list of all available palettes.
|
|
•
|
You can specify colors by their RGB values using a color data structure, which is constructed with the ColorTools:-Color command. An example is: color=ColorTools:-Color([0.5, 0.2, 0.1]). Other color spaces, such as "HSV", are also available and are described on the ColorTools:-ColorSpaces help page.
|
|
•
|
A default set of colors from the "Niagara" palette is used by certain plotting commands, including the 2-D plot command. You can change the default assignment of colors with the plots:-setcolors command.
|
|
•
|
Some 3-D plotting commands, including plot3d, also allow you to specify a procedure or an expression involving the plot variables. This feature is useful for purposes such as visualizing four-dimensional objects using color as the fourth dimension. For more information, see the plot3d/colorfunc help page.
|
|
|
|
Compatibility
|
|
|
•
|
The color option was updated in Maple 16.
|
|
|
|
Examples
|
|
|
>
|
|
|
>
|
|
|
>
|
|
Plot the tan function in sky blue.
|
>
|
|
|
>
|
|
Plot a randomly colored checkerboard.
|
>
|
/10^12, rand()/10^12, rand()/10^12])), i = 1 .. 10), j = 1 .. 10)](/support/help/helpview.aspx?si=2037/file01037/math176.png)
|
|
>
|
|
Create a randomly colored polygon animation sequence.
|
>
|
/10^12, rand()/10^12, rand()/10^12])), i = 1 .. 20)](/support/help/helpview.aspx?si=2037/file01037/math191.png)
|
|
>
|
|
Create another polygon animation sequence using an HSV color specification.
|
>
|
])), i = 1 .. 20)](/support/help/helpview.aspx?si=2037/file01037/math206.png)
|
|
>
|
|
|
|
Download Help Document
Was this information helpful?