WOLFRAM
Products
Wolfram|One
Mathematica
Wolfram Notebook Assistant + LLM Kit
Wolfram|Alpha Notebook Edition
System Modeler
All Products
Consulting & Solutions
Wolfram Consulting
Industry Solutions
Solutions for Education
Learning & Support
Wolfram U Courses
Wolfram Language Resources
Wolfram Community
Support FAQs
Contact Support
Company
About Wolfram
Careers
Events
Educational Programs
All Sites and Resources
Wolfram|Alpha
Wolfram Cloud
Your Account
Your Account
User Portal
Search
Close
Enable JavaScript to interact with content and submit forms on Wolfram websites.
Learn how
Legacy Documentation
Mathematica 8
(2010)
This is documentation for Mathematica 8, which was
based on an earlier version of Wolfram Language.
View current documentation (Version 14.3)
Mathematica
>
Visualization and Graphics
>
Graphics Options & Styling
>
Colors
>
ColorFunction
>
Mathematica
>
Data Manipulation
>
Image Processing & Analysis
>
Color Processing
>
Colors
>
ColorFunction
>
Mathematica
>
Visualization and Graphics
>
Symbolic Graphics Language
>
Graphics Directives
>
Colors
>
ColorFunction
>
BUILT-IN MATHEMATICA SYMBOL
Density and Contour Plots
Tutorials »
|
ColorFunctionScaling
MeshShading
PlotStyle
NormalsFunction
Blend
ColorData
See Also »
|
Chart Styling & Layout
Colors
Financial Visualization
Graphics Options & Styling
Plotting Options
Vector Visualization
New in 6.0: Graphics & Visualization Options
More About »
ColorFunction
ColorFunction
is an option for graphics functions that specifies a function to apply to determine colors of elements.
With
ColorFunction
->
func
, the arguments supplied to
func
are as follows:
Raster
a
Plot
,
ListLinePlot
,
ListLogPlot
, etc.
x
,
y
ParametricPlot
x
,
y
,
u
or
x
,
y
,
u
,
v
RegionPlot
x
,
y
ArrayPlot
,
ReliefPlot
a
ContourPlot
and
ListContourPlot
f
contour levels
DensityPlot
and
ListDensityPlot
f
ContourPlot3D
,
ListContourPlot3D
x
,
y
,
z
,
f
Plot3D
,
ListPlot3D
,
ListSurfacePlot3D
, and
ListPointPlot3D
x
,
y
,
z
ParametricPlot3D
x
,
y
,
z
,
u
or
x
,
y
,
z
,
u
,
v
RegionPlot3D
x
,
y
,
z
With the usual default setting
ColorFunctionScaling
->
True
, all arguments supplied to
func
are scaled to lie in the range 0 to 1.
With
ColorFunctionScaling
->
False
original unscaled values are used.
ColorFunction
is equivalent to
ColorFunction
->(
ColorData
["
name
"][#
i
]&)
where the slot used is as follows:
Plot
,
ListPlot
, etc.: ();
ArrayPlot
,
ReliefPlot
: ();
ContourPlot
,
DensityPlot
, etc.: ();
ContourPlot3D
, etc.: ();
Plot3D
, etc.: ().
The list of possible color function names is given by
ColorData
.
The function specified by
ColorFunction
must return color directives such as
RGBColor
and
Hue
or named colors such as
Red
and
Blue
.
It can also return
Opacity
, as well as
Glow
and
Specularity
.
Combinations of directives can be specified using
Directive
.
In 3D graphics,
ColorFunction
by default specifies diffuse colors for surfaces.
If an explicit setting is given for
ColorRules
,
MeshShading
, or
ContourShading
, it is used in preference to the setting for
ColorFunction
.
(4)
Color the surface by height:
Use predefined gradients:
Color a curve:
Color a matrix:
Color the surface by height:
Out[1]=
Use predefined gradients:
Out[1]=
Out[2]=
Color a curve:
Out[1]=
Color a matrix:
Out[1]=
(1)
Define a one-dimensional color function:
(1)
Use predefined color gradients from
ColorData
:
ColorFunctionScaling
bullet
MeshShading
bullet
PlotStyle
bullet
NormalsFunction
bullet
Blend
bullet
ColorData
Density and Contour Plots
Chart Styling & Layout
Colors
Financial Visualization
Graphics Options & Styling
Plotting Options
Vector Visualization
New in 6.0: Graphics & Visualization Options
New in 2 | Last modified in 6
ja
zh
AltStyle
によって変換されたページ
(->オリジナル)
/
アドレス:
モード:
デフォルト
音声ブラウザ
ルビ付き
配色反転
文字拡大
モバイル