plot3d Color Functions - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Graphics : 3-D : Options : color : plot3d/colorfunc

plot3d Color Functions

Calling Sequence

plot3d(plot3dops, color=c)




other plot3d options; see plot3d/options



color specification; procedure or expression, or a list of three procedures or expressions



Three-dimensional plot objects can be colored with the color option in three ways: using a color name, using specific RGB or hue values (via a color data structure), or using a color function (given as a procedure or expression). For instructions on how to specify a single color using pre-defined names or specific RGB or hue values, see plot/color. See also the plot/colorscheme help page for an alternative way to color a surface. This help page describes how to specify color of 3-D plots using color functions.


You can specify the coloring using an expression or a list of three expressions in terms of the plot variables. In case of the single expression, the resulting values over the plotting domain are mapped to the HUE coloring scheme. In case of the list of three expressions, the resulting tuples over the plotting domain are mapped to RGB values. To map to HSV values, include the option colortype=HSV as the fourth element of the list.


Similarly, you can specify the coloring using a procedure or a list of three procedures optionally followed by colortype=HSV.  The use of an expression or a procedure in the color specification should be consistent with the input that is provided for plotting.  For example, if the first argument to plot3d is a procedure, then a procedure (taking two input parameters and returning a HUE value), rather than an expression, should be used with the color option.


In general, specifying the color using procedures or expressions works only with surfaces defined explicitly by a procedure or expression.  For example, spacecurves generated by the plots[spacecurve] command and most surfaces generated by the plottools package commands cannot be colored in this way.  Instead, you can color those surfaces as described in plot/color.


In the following example, the surface and the color function are specified by procedures.




plot3d(f, 0..20, 0..70, color=proc(x,y) x*y end proc);

In this example, the the surface and the color function are specified by expressions.



See Also

plot/color, plot/colornames, plot/colorscheme, plot3d, plot3d/options, plottools

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam