8.6.3 Color Scales


The color scale is a specialized label object that displays a color map and its scale. Color Scale in Origin 2018b is improved to be more flexible and customizable.

  • Typically, color scale is used to display a color palette and its numerical scale for color mapped or contour data plots. The color scale displays by default when creating color-filled/gray-scale contour or 3D colormap surface graphs in this case.
  • Sometimes you may want a color scale to display the color increment within a group of data plots. The increment can be line color, symbol edge color, and filled color of the symbol or pattern.
  • Even if there is no color mapping at all, a color scale can be added independently from the data plots.
Color scales independent of data.png

In the last two cases, color scale will not added automatically when the graph is created (see Adding an independent color scale, below).

Adding a color scale to a graph of color mapped data

  1. Select Insert: Color Scale.

or

  1. Click the Add Color Scale button Button Add Color Scale.png on the Graph toolbar.

or

  1. Right-click the legend to select Add Color Scale from the context menu.
Note: if the graph has multiple plot properties mapping to different color palette/increment lists, you can select these menu commands/the toolbar button several times to add multiple color scales until all color mapped properties are displayed.

Color Scale Control dialog

This dialog can be opened by double clicking on the color scale object or right clicking and choosing Properties. It is used to control and customize the style of the color scale. It is designed with tree node structure, so in order to do customization, first select a desired page in the left panel, and then change the settings on the right panel.

Fill

This page decides whether the color scale depends on a plot property or not.

Map

Specify whether the color scale depends on a plot/group property or independent from the data plot.

  • plot/group list in current layer
    The color scale displays a color palette/increment list mapping to an element of the selected plot/group.
  • None
    The color scale is independent from the data plot.
Fill

This is only available when None is chosen for Map. Click the trianle button and select a color palette or increment list to display. Pressing CTRL and clicking a palette/color list will open that palette/color list in the Increment Editor dialog. You can add, delete, reorder, or change colors in this dialog. Refer to this page for details.

If you want to add an independent color scale in a graph that has plots mapping to a palette or color list, run LabTalk command:

spectrum -i;

in the Script Window.

Levels

This page is designed to determine how to show the color scale levels.

Hide Head and Tail Levels

This is only available when a data plot is chosen for Map on Fill page. Specify whether to hide the head and tail levels in the color scale. The head and tail levels are for the color map values which are outside the selected color scale range.

Color Scale Hide Head Tail.png
Show on

Specify where to show the label(s) of color scale level from the drop-down list:

  • ALL Major Levels
    Show color scale level labels in all major levels defined in the Color Map tab of Plot Details dialog.
  • Partial Total Levels
    Show color scale level labels in selected major levels. This is determined by the setting in One Major Tick Per Levels.
  • Custom Levels
    Show color scale level labels at custom levels, the levels can be defined by the From, To, Type and/or Major Ticks options.
One Major Tick Per Levels

This is only available when Partial Total Levels is chosen for Show on. It is used to specify the number of levels in between two adjacent displayed major ticks. Note that the value used cannot exceed the number of major levels in the color map, and the first and last major levels will always be shown.

From

This is only available when Custom Levels is chosen for Show on. Specifies the start value for the color scale.

To

This is only available when Custom Levels is chosen for Show on. Specifies the end value for the color scale.

Type

This is only available when Custom Levels is chosen for Show on. Specifies the scale type for color scale. You may refer to the help file of Scale in Axis Dialog for a detailed description on all options in this drop-down menu.

Major Ticks

This is only available when Custom Levels is chosen for Show on. Specifies the major tick positions for color scale. You may refer to the help file of Scale in Axis Dialog for a detailed description on all controls under this tree node.

Minor Ticks

Specifies the minor tick positions for color scale. You may refer to the help file of Scale in Axis Dialog for a detailed description on all controls under this tree node.

Labels

The controls in this page are used to customize the display and format of the color scale level labels.

Label Form

Label Form Specify which label form to be used to indicate levels:
  • Value
    Use the level value of each color block specified in Color Map/Contours tab of the Plot Details dialog as color scale label
  • Range
    Use the level range of each color block, eg., Block Start Value - Block End Value as color scale label. For head level range, label style is < Min and for tail level range it is > Max.

Display

The Auto check box is only available when a data plot is chosen for Map on Fill page. If this check box is selected, the display of color scale level labels will follow the numeric format settings in the Contour Labels tab of the Plot Details dialog.

If the Auto check box is not selected, the display of color scale level labels can be customized using the other controls under this Display tree node, and you can refer to the help file of Tick Labels in Axis Dialog for a detailed description on those controls.

Format

Color

Select the desired color for the color scale level labels from this drop-down list. Create custom colors by clicking a blank color well under Custom and specifying the RGB in the Color dialog that opens. If it is set to Auto, the color scale label will follow the colormap color.

Rotate (deg.)

Origin supports arbitrary rotation of color scale labels. Type a positive number in this text box to rotate labels counterclockwise, and a negative number to rotate labels clockwise (Origin will change the typed negative number into the corresponding positive number counterclockwise).

The <auto> option means that the color scale labels will rotate according to the direction of color scale object, means labels will always be perpendicular with the color scale object.

Wrap Text

This is used to specify whether to wrap the text in color scale labels to avoid overlapping.

Note that text will only be wrapped at the white space in between each word.

Alignment

Choose from drop-down list of three options on how should the color scale labels align with their corresponding color scale levels.

  • Center
    Center the color scale labels with the major color scale levels.
  • Center between Ticks
    Locate the color scale labels equidistantly between adjacent major color scale levels.
  • Next to Ticks
    Align the left edge of the color scale labels with the major color scale levels.
Font

Under this tree node, you can find controls to specify the Font, Size, and Style (Bold, Italic or Underline) of the text.

Layout

This page is used to determine the layout of the color scale, e.g. orientation, offsets, background.etc.

Background Specify the background style for the color scale:
  • None
    Background is transparent.
  • Black Line
    Color scale is bounded by a black line box.
  • Shadow
    Color scale is bounded by a black line box with shadow.
  • Dark Marble
    Background style uses dark gray marble.
  • White Out
    Color scale is bounded by a box filled with white color.
  • Black Out
    Color scale is bounded by a box filled with black color.
Layout This option specifies how to display the levels of a color scale. Two layouts are available:
Color Scales 01.png
Arrangement Specify the orientation of the color scale object.
  • Auto
    When this is selected, you can change the orientation of the color scale object by drag and drop the anchor points around the color scale object.
  • Vertical
    When this is selected, the color scale object will always be along the vertical direction.
  • Horizontal
    When this is selected, the color scale object will always be along the horizontal direction.
Reverse Order Select this check box to reverse the color map and associated labels.
Show Labels on Opposite Side Select this check box to show the color scale labels at the opposite side.
Follow Graph's Standard Font Size Setting Select this checkbox to convert the font size of color scale to universally standard font size.
Gap between Symbols Only available when Layout is set to Separated. Specify the gap between each two color blocks in unit of % of current color scale label font height.
Size and Label Offset (in % of font height)

The controls under this tree node are used to specify the size and offset of the color scale. All the settings are based on the unit in % of current color scale label font height.

  • Color Bar Thickness
    Set the width of the color scale
  • Label Offset from Bar Edge
    Set the gap between the color scale and its associated labels.
  • Label Side Offset from Center
    Specify a side offset to shift the labels along the direction of color scale object in relation to the center of color scale labels defined by the Alignment. Both positive and negative values are allowed and means shift towards opposite directions.

Title

This page is used to control the color scale title.

Show Determine whether to show the color scale title.
Title Type the text to be used in the color scale title. By default the syntax is %(?R, @options), in which ?R refers to the data set (column or Z value of a matrix) for color mapping, and @option determines which meta data to be used. For details, refer to legend text substitution notation.
Position

Select the position of the color scale title from the drop-down list.

Rotate Origin supports arbitrary rotation of the title.
  • Arbitrary Rotation:
    Select or enter a positive value in this text box to rotate the title counterclockwise; a negative value to rotate title clockwise.
  • Automatic Rotation:
    When you choose the <auto> option, the color scale title(s) are automatically rotated to remain perpendicular to the corresponding line.
Color Select a title text color from this drop-down list.
Font

Under this tree node, you can find controls to specify the Font, Size, and Style (Bold, Italic or Underline) of the text.

Line and Ticks

In the page of the first level of this tree node, you can determine how the line and ticks around the color scale object are displayed.

For Horizontal arrangement:

Use Same Options for Left and Right Check this box to use the same line and ticks options for both left and right lines. When the check box is checked, Show Line and Ticks on Left is unavailable. The corresponding Top sub-branch is also unavailable. You only need to customize the Right part and the settings will be applied to the Left.
Show Line and Ticks on Right Select this check box to display line and ticks on the right. To hide line and ticks, clear this box.
Show Line and Ticks on Left Select this check box to display line and ticks on the left. To hide line and ticks, clear this box.
Show Border Select this checkbox to display borders around the color blocks. To hide borders, clear this box.
Border Color Only useful when Show Border is selected, and choose the color of border in this drop-down color list.
Border Thickness Only useful when Show Border is selected, and select or type in the border thickness in the combo box.

For Vertical arrangement, Right will become Bottom and Left will become Top.

Bottom/Top/Right/Left

You can further customize the styles of the line and ticks which will be displayed around the color scale object.

Line
  • Color
    Select or define the color of line and ticks.
  • Thickness
    Type or select the desired line thickness (in points, where 1 point=1/72 inch) for the line and ticks from this combination box.
Major Ticks
  • Style
    Control the direction of major ticks from this drop-down list.
  • Length
    Type or select the desired major tick length (in points, where 1 point=1/72 inch) from this combination box.
Minor Ticks
  • Style
    Control the direction of minor ticks from this drop-down list.
  • Length
    Type or select the desired minor tick length (in points, where 1 point=1/72 inch) from this combination box. Auto means that the length is half that of major ticks.

Adding an independent color scale

For any graph in which color values are mapped to data values, a color scale is the default legend.

You can add a color scale to a graph or layout window, that is completely independent of any plotted data:

  1. Click the Color Scale button Button Add Color Scale.png (Add Object to Graph toolbar).
  2. Double-click the added color scale to open the Color Scale Control dialog box.
  3. Highlight Fill (left-panel) and set Map = None (Layout windows will have only this option).
  4. Click the Fill list and choose your palette or increment list.
  5. Highlight Levels, set Show on = Custom Levels.
  6. Set the desired From and To range and decide what your tick Type will be choose Increment, Count, etc.
  7. Highlight Labels and set Type = Numeric and choose your Display options. If you need to reverse the scale, highlight Layout and check Reverse Order.
Layout independent color scale.png

See more related videos: Add Color Scale in Graph

Manual control of the color scale

Display of a customized color scale object can be controlled manually with the \l(CN) switch. In this switch, C must be capitalized, and N is an integer representing a level. The color of the level is the same as the color set in the Color Map/Contours tab of the Plot Details dialog.

To control the color scale manually:

  1. Create a text object by clicking the Text Tool button on the Tools bar.
  2. Enter arbitrary characters, and then select this text object and bring up the Object Properties dialog by selecting Properties from the right-click menu.
  3. In the Text tab of the opened dialog, change the characters to be \l(CN), then a level's color, specified by N, is shown in the lowest panel.
  4. Click the OK button; the specified level is shown on the graph.

If N is 0, 1, or not specified, the color is black. If N=2, the color for missing values will be shown. If N is larger than 2, the color for the (N-2)th level will be shown. If N is 2 more than the total number of levels, the color shown will be black.