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.
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
- Select Insert: Color Scale.
- Click the Add Color Scale button on the Graph toolbar.
- 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.
This page decides whether the color scale depends on a plot property or not.
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.
- The color scale is independent from the data plot.
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:
in the Script Window.
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.
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.
This is only available when Custom Levels is chosen for Show on. Specifies the start value for the color scale.
This is only available when Custom Levels is chosen for Show on. Specifies the end value for the color scale.
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.
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.
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.
The controls in this page are used to customize the display and format of the color scale level labels.
||Specify which label form to be used to indicate levels:
- Use the level value of each color block specified in Color Map/Contours tab of the Plot Details dialog as color scale label
- 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.
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.
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.
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.
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.
Choose from drop-down list of three options on how should the color scale labels align with their corresponding color scale levels.
- 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.
Under this tree node, you can find controls to specify the Font, Size, and Style (Bold, Italic or Underline) of the text.
This page is used to determine the layout of the color scale, e.g. orientation, offsets, background.etc.
||Specify the background style for the color scale:
- Background is transparent.
- Black Line
- Color scale is bounded by a black line box.
- 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.
|| This option specifies how to display the levels of a color scale. Two layouts are available:
||Specify the orientation of the color scale object.
- 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.
- When this is selected, the color scale object will always be along the vertical direction.
- When this is selected, the color scale object will always be along the horizontal direction.
||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.
This page is used to control the color scale title.
||Determine whether to show the color scale 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.
Select the position of the color scale title from the drop-down list.
||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.
||Select a title text color from this drop-down list.
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.
You can further customize the styles of the line and ticks which will be displayed around the color scale object.
- Select or define the color of line and ticks.
- 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
- Control the direction of major ticks from this drop-down list.
- Type or select the desired major tick length (in points, where 1 point=1/72 inch) from this combination box.
| Minor Ticks
- Control the direction of minor ticks from this drop-down list.
- 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:
- Click the Color Scale button (Add Object to Graph toolbar).
- Double-click the added color scale to open the Color Scale Control dialog box.
- Highlight Fill (left-panel) and set Map = None (Layout windows will have only this option).
- Click the Fill list and choose your palette or increment list.
- Highlight Levels, set Show on = Custom Levels.
- Set the desired From and To range and decide what your tick Type will be choose Increment, Count, etc.
- Highlight Labels and set Type = Numeric and choose your Display options. If you need to reverse the scale, highlight Layout and check Reverse Order.
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:
- Create a text object by clicking the Text Tool button on the Tools bar.
- Enter arbitrary characters, and then select this text object and bring up the Object Properties dialog by selecting Properties from the right-click menu.
- 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.
- 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.