Mathematica > Visualization and Graphics > Charting and Information Visualization > Chart Styling & Layout >
Mathematica > Visualization and Graphics > Data Visualization > Charting and Information Visualization > Chart Styling & Layout >

ChartStyle

ChartStyle
is an option for charting functions that specifies styles in which chart elements should be drawn.
  • ChartStyle->g specifies that graphics directive g should be used to draw all chart elements.
  • ChartStyle->{g1, g2, ...} specifies that successive directives gi should be used cyclically for successive elements in each dataset.
  • ChartStyle->{spec1, spec2, ...} uses the successive speci to contribute styles for successive dimensions in nested lists of datasets.
  • With the form ChartStyle->{spec1, spec2, ...}, the i, j, ... element in a nested list of datasets has a style given by applying spec1[[i]], then spec2[[j]], etc.
  • Any speci that is None contributes no style directives.
  • A specification {g1, g2, ...} is effectively equivalent to {None, ..., None, {g1, g2, ...}}.
  • The directives that can be used in ChartStyle include:
Dashing[{w1,...}]dashing specification
Directive[g1,g2,...]composite graphics directive
EdgeForm[g]edge-drawing specification
FaceForm[g]face-drawing specification
Glow[c]glow color
GrayLevel[i]intensity
Hue[h]hue
Opacity[a]opacity
PointSize[d]point size
Red, Blue, etc.named colors
RGBColor[r,g,b]RGB color
Specularity[s]surface specularity
Thickness[w]line thickness
  • ChartStyle->"name" effectively takes the list of styles needed by ChartStyle to be given by sampling ColorData["name"][x] at equally spaced values of x.
  • Style[data, s] can be used to style chart elements associated with individual data points or datasets. Such specifications are used after specifications from ChartStyle.
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team