ScaleRangeStyle

ScaleRangeStyle
is an option for gauge functions to describe how to style different sections of the scale.

DetailsDetails

  • ScaleRangeStyle gives styles for both the background and foreground of the region.
  • ScaleRangeStyle->style specifies that all ranges are to be rendered by default with the specified style.
  • ScaleRangeStyle->{style1, style2, ...} specifies that range i should be styled according to .
  • ScaleRangeStyle provides style instructions for ScaleRanges. The possible forms are:
  • Noneno special styling
    Automaticdefault styling
    stylestyle for the background of the range
    {styleback,stylefront}distinct styles for background and foreground
    nstyles taken from ColorData[n]
    "name"discrete styles sampled from ColorData["name"]
    cfdiscrete styles sampled from color function cf
  • Styles can be specified using graphics directives such as Thick, Red, and Dashed, as well as Thickness, RGBColor, Dashing, and combinations given by Directive. Styles for the foreground can also contain rules for options such as FontSize and FontFamily.
  • ScaleRange->{{r1, min, r1, max}->s1, {r2, min, r2, max}->s2, ...} can be used to specify a style for range .
  • Explicit styles specified in the setting for ScaleRange can override styles specified in ScaleRangeStyle.

ExamplesExamplesopen allclose all

Basic Examples (10)Basic Examples (10)

By default, the scale ranges are styles are based on the marker color:

In[1]:=
Click for copyable input
Out[1]=

Apply a style to every range:

In[1]:=
Click for copyable input
Out[1]=

Use a list of directives to style each range separately:

In[1]:=
Click for copyable input
Out[1]=

Use ScaleRangeStyle->{None, style} to apply a style to the scale only:

In[1]:=
Click for copyable input
Out[1]=

Apply a style to the backgrounds and foregrounds of all the ranges:

In[1]:=
Click for copyable input
Out[1]=

Color the scale ranges with built-in color schemes:

In[1]:=
Click for copyable input
Out[1]=

Define a one-dimensional color function:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Colors are taken from the Automatic styling if not specified in ScaleRangeStyle:

In[1]:=
Click for copyable input
Out[1]=

Styles will repeat cyclically, if necessary:

In[1]:=
Click for copyable input
Out[1]=

Rule specified styles override the ScaleRangeStyle:

In[1]:=
Click for copyable input
Out[1]=
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »