ChartStyle

ChartStyle

is an option for charting functions that specifies styles in which chart elements should be drawn.

Details

  • 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->scheme generates styles from ColorData[scheme,].
  • For an integer i, ChartStyle->i is effectively equivalent to ChartStyle->ColorData[i,"ColorList"].
  • 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.

Examples

Basic Examples  (2)

Give a list of styles:

Use gradient colors from ColorData:

Use indexed colors from ColorData:

Style each column of data:

Style each row of data:

Style both rows and columns of data:

Wolfram Research (2008), ChartStyle, Wolfram Language function, https://reference.wolfram.com/language/ref/ChartStyle.html.

Text

Wolfram Research (2008), ChartStyle, Wolfram Language function, https://reference.wolfram.com/language/ref/ChartStyle.html.

BibTeX

@misc{reference.wolfram_2021_chartstyle, author="Wolfram Research", title="{ChartStyle}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ChartStyle.html}", note=[Accessed: 17-September-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_chartstyle, organization={Wolfram Research}, title={ChartStyle}, year={2008}, url={https://reference.wolfram.com/language/ref/ChartStyle.html}, note=[Accessed: 17-September-2021 ]}

CMS

Wolfram Language. 2008. "ChartStyle." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ChartStyle.html.

APA

Wolfram Language. (2008). ChartStyle. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ChartStyle.html