9.3.1 Customizing Data Plot Colors
Plot colors are customized and applied from Origin's Color Chooser.
In addition to this topic, you may want to see these pages for information on customizing plot colors.
Opening the Color Chooser
The Color Chooser is opened from the Plot Details dialog box or from Style toolbar buttons.
- You can display RGB values on the color button by setting system variable @RGBS to 1.
- You can use function color() to return the corresponding RGB composite value for a specified html color code.
Defining and Using Custom Colors
Origin's Default Color List
Origin contains a default, non-customizable color list which exists primarily for backward compatibility and for programmatically assigning color. That color list can be found in the LabTalk Reference table "List of Colors".
The GUI user needn't be concerned with this color list as the Color Chooser contains a number of built-in Color Lists, any of which can be customized and saved as an Increment List (.oth file) to your \User Files\Themes\Graph folder.
When publishing an article, you may be asked to submit color images from which both color (e.g. online) and black and white (e.g. print) images will be produced. To verify that your color list provides sufficient plot differentiation, you can preview it in grayscale. Choose File: Print Preview and click the Grayscale button.
Defining a Custom Color
- Open the Color Chooser, then click on the Single tab.
- Click a blank color well under Custom to open the Colors dialog, and then go to Custom tab. You can define colors in one of three ways:
- Manipulate the cross-hair and slider to pick a color.
- Click the eyedropper tool, then click on the desired color in another portion of your workspace.
- Enter the value of RGB, HSL or HEX of color in edit boxes.
- Custom the name for the user-defined color.
The color is added to the Color Chooser Custom group. Continue to define more colors, as needed.
other things to note ...
- To modify an existing Custom color, CTRL+click on a color well and use the Colors dialog box.
- To fine-tune the color previously selected, click a blank well in Custom group and drag the slider to update it.
- Colors in both Custom and Recent Colors groups are automatically preserved across sessions (i.e. they will still be there the next time you start Origin).
- To apply Custom colors as a group (e.g. to increment color by points in a plot), you must save them as an Increment List (see below).
- If, before saving a list of Custom colors, you load another color list, you can restore the color list you are working on by clicking the Custom menu and selecting Last Custom Colors.
Saving a Series of Custom Colors as an Increment List
- Before defining a series of custom colors to be saved as a list, you may want to clear the color wells. Click the Custom menu, then click Clear.
- Define your list of colors using the procedure described above.
- When you have completed filling the wells with your sequence of custom colors, click the Custom menu again and choose Save As ...
- Enter a name in the Save As Increment List dialog and click OK. Note that you can click the drop-down list in this dialog and save the current selection to a previously-created list.
Create Color List from Column
When Format of columns is set to Color in the project, the option Create Color List from Column is shown under Custom menu of Color Chooser.
Select a color format column under Create Color List from Column, the color in the column will be added into the Custom color. And you can save it as Increment list like above section.
Working with Color Increment Lists and Palettes
Using a Saved Increment List
A non-continuous group of colors -- whether custom or built-in -- comprises an Increment List. You can load that list from any of the three Color Chooser tabs:
- Single: Click the list control (downward pointing arrow) to the right of More Colors.
- Choose a color list and click one of the available color wells.
- By Points: Click the list control beside Color List.
- When incrementing color By Points, change the starting color by moving the Increment From slider. If the list is exhausted before all points are plotted, color is assigned to the remaining points, beginning from the first color in the list.
- By Plots: Click the list control beside Increment List.
- When you are on the By Plots tab of the Color Chooser and you select a new Increment List (other than Q02 Basic), you are presented with a list of variants. These are "tint and shade" variants and you click on one of the variants to apply the color variants in that list, to your plots. The same list of tint and shade variants can be loaded from the Single tab, though these variants appear as individual blocks and colors can only be applied singly.
The Increment Editor
Any color list (built-in or user-defined) can be loaded from any Color Chooser tab and edited using the Increment Editor.
Loading an Increment List
- Single (Custom List only): Click the Custom menu and choose Open Increment Editor. Right-click in the Increment Editor and Load Increment List. This loads a list of all colors under Custom, into the Increment Editor.
- By Points or By Plots: CTRL + Click directly on a color list (including tint/shade variants or palettes); or click the button at the end of the color list. This opens the color list or palette in the Increment Editor.
Modifying the Increment List
Use the Increment Editor to modify an increment list and save it as a new increment list (see below).
Rearranging a list
- Use the Move up, Move Down, Move to Top and Move to Bottom buttons to change the row index of the color list.
- Click the button at the top of the list to move the bottom color to the top of the list; click the button to move the top color to the bottom of the list.
- You can also drag to rearrange the order of the Color List.
Add a color to the list
Right-click on the list to Add a color to the list. The added color will appended to the bottom of the list. To change the added color, click the list control to the right of the new color and pick a color from one of the available lists, or add a custom color.
Delete a color from the list
Highlight a color and use the Delete button to right; or right-click on a list member and choose Delete from the shortcut menu.
Flip the color list
Click the Flip button to flip the custom increment color list.
Some users prefer a natural language name in place of html color codes (hex codes). Click the Rename button to make the color codes fields editable, then enter a name for your color.
Loading, Saving and System Increment Lists
Loading an Increment List
While in the Increment Editor, you can load a saved list by right-clicking anywhere on the Color List and choosing Load Increment List.
Select More option to open the Color Manager dialog. In the dialog, you can specify the which Color Increment List shows in this list.
Saving an Increment List
Once you have modified an increment list, you can right-click anywhere in the Color List and choose Save Increment List from the shortcut menu.
Modified lists are saved as .oth files, to the \User Files\Themes\Graph folder. Once saved, these increment lists become available throughout the user interface (other color list controls, Theme Organizer, etc.)
Loading and Editing a Palette
In the Increment Editor, you can also load a saved palette. Additionally, you can open a simple Palette Editor by right-clicking on the loaded list and choosing Open in Palette Editor. In the Palette Editor, you can adjust RGB values, color interpolation, or systematically expand the number of colors in a list by increasing the Total number of colors. You can then save the list as a new Increment List (as an .oth file). Note, however, that you cannot save these edits to a .pal file. For information on editing and saving .pal files, see Adding New Color Palettes to Origin.
Load a Palette
Right-click on the list and select Load Palette. Choose from one of 23 built-in or from user-defined palettes shown in the context menu. You can browse to a user-defined palette file by clicking Browse....
Edit a Palette
Right-click on the list and select Open in Palette Editor.... This opens the Palette Editor dialog box.
|Total number of colors
||The total number of the colors in new palette.
||Display the original color list
Red, Green or Blue three color channels can be selected on the radio button.
Using the vertical scroll bars, you can adjust the specified channel value from 0 to 255 for the first, middle and last color in the new palette.
Interpolation of colors in the list helps to smooth color transitions. Two methods of interpolating are provided.
Interpolation is performed using the Total number of colors setting.
- Use linear interpolation between the first, middle and last color to produce a continuous gradient of color.
- This option adjusts the RGB value for the first (last) color, that value for the last (first) one will change to the same, then the color gradient in the list appears sinusoidal.
In this dialog, the new palette defined cannot be saved as a user-defined palette file, but you can save it as a theme of the color list.
Origin just supports using the PalEdit dialog to create the palette file.
Remove Color Lists and Restore All
Expand the color lists, right-click on one list, you can use the context menu to hide it. You can also use Show All menu item to restore all color lists, including the user-defined ones and built-in ones.
Using Column Values to Apply Color By Points
When you are on the By Points tab of the Color Chooser, you have a number of options for applying color to the data points in a plot. The most basic choice, Incrementing, allows you to set a starting color for the first data point, then assign colors from a color list, to subsequent points. See the "By Points" discussion under Using a Saved Increment List.
Other options allow you to use a dataset to apply color to the plot: (For an overview, see Using a Dataset to Control Plot Color).
- Indexing. Uses a dataset of integer or categorical values to apply color. See Indexing.
- Direct RGB. Uses an RGB composite value to apply color. See Direct RGB
- Color Mapping. Uses a dataset of real numbers to map ranges of values to a color scale. See Color Mapping
- Density Color Mapping. Used only with the Density Dots scatter template.
- Y Value: Color Mapping. When there are multiple Y data plots in a graph, use the respective Y value dataset as real numbers to map ranges of values to a color scale. See Y Value: Color Mapping
- Y Value: Plus-Minus-Total. Only available for Bridge chart (also called McKinsey-style waterfall plot). It fills column/bar colors according to the condition whether the data point Y value is Positive, Negative or Total. The Total can be set in Data Indices for Total/Subtotal option on Bridge Chart tab. You can see the fill color sequence in Color List at the bottom. Note that only the first 3 colors will be used for Y Value: Plus-Minus-Total option: The 1st color in the list will be assign to Positive y, 2nd color will be assign to Negative, 3rd to Total. See Y Value: Plus-Minus-Total.
You can modify the sequence in a color list by pressing CTRL and clicking directly on the list; or by clicking the pencil icon to the right of the list. Either opens the the Increment Editor.
Density Color Mapping
One of the (color) By Points options is Density Color Mapping. Rather than use a column of values to assign color, this setting assigns color based on the density of points in a scatter plot. It is intended for use specifically with the Density Dots template for creating scatter plots of large datasets. Unless you have a scatter plot with a significant number of superimposed points, you will not find this option useful.
|Note: Any time you apply color-mapping to a dataplot, a Colormap tab is added to Plot Details and it is on the Colormap tab -- not the Symbol tab -- that you control how color is applied to the plot.
Using Column Label Row Values to Control Plot Color
Besides using column indices to apply a color list to grouped plots, for waterfall and colormaped line series graph you can use the actual values of one column identifier(one column label row) to vary the grouped plots in color.
To use column label values to color-map grouped plots,
- plot all these Y columns as 2D waterfall or colormaped line series graph,
- select one column label row as Z values in Waterfall tab,
- go to the Line or Symbol tab to specify how to use these label values to vary all plots in current group.
Z Values can be selected as
- Indexing: Use the values in the selected column label row to index the colors of grouped plots in a specific Color List.
- Direct RGB: Treat the selected column label row as a group of RGB values to apply colors to grouped plot.
- Color Mapping: Create a mapping relationship between the selected Z values and an associated scale of colors. The color will then be applied to the grouped plots according to its Z Values.
To learning the details about these three methods, please refer to the page "Using a Dataset to Control Plot Color"
What is "Auto" Color?
Some color buttons display Auto, by default.
When Auto shows on the button, color is applied in this way:
|When color = Auto, this element...
||...follows this setting:
(Fill) Pattern Color
(Drop Lines) Color
(Line) Color. If the data plot does not include a Line tab, then display Black.
(Symbol) Edge Color
(Line) Color. If the data plot does not include a Line tab, then display Black.
(Symbol) Fill Color
Default Symbol Fill Color list selection on the Graph tab of the Options dialog box.
(Error bar) Color
Border Color. If no symbol (scatter, column, etc.) exists, follow (Line) Color.
Some of Origin's color buttons and color lists also include a None option. When you select None, the data plot element is transparent.