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.
Using a Saved Increment List
Once you have saved a group of custom colors as an Increment List, you can load that list from any of the three Color Chooser tabs:
- Single: Click More Colors.
- By Points: Click Color List.
- By Plots: Click 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 can click on any variant to apply (and edit and save) 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 colors on this tab can only be applied singly.
When incrementing color By Points, change the starting color by moving Increment From slider. If the list is exhausted before all points are plotted, color will be assigned beginning with the first color in the list.
|Note: You cannot build or edit palettes within the Plot Details-Color Chooser interface, but there are procedures for adding palettes to Origin. For more information, see Adding New Color Palettes to Origin
Editing Color Lists in the Increment Editor and Palette Editor
Any color list (built-in or user-defined) can be loaded from any Color Chooser tab and edited using the Increment Editor:
- Single: Click the Custom menu and choose Open Increment Editor. Right-click in the Increment Editor and Load Increment List.
- By Points or By Plots: CTRL+click on a color list (including tint/shade variants) or palette, to open the list in the Increment Editor.
- In the Increment Editor, you can also open a simple Palette Editor (by right-clicking on the loaded list in the Increment Editor), where 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.
|Note: You can customize and save any of the supplied Color Lists as an Increment List. These .oth files are saved to the \User Files\Themes\Graph folder. To remove custom Color Lists from the Color Chooser, delete .oth files from this folder.
Remove Color Lists and Restore All
Expand the color lists, right-click on one list, you can use the context menu to delete 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 five options for applying color to the data points in a plot. The most basic choice, Incrementing, allows you to set a starting color, then cycle through a list of colors in sequential fashion. See the "By Points" discussion under Using a Saved Increment List.
The three options, Indexing, Direct RGB and Color Mapping allow you to use a dataset of numerical values to apply color to the plot:
- 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
The last option, Y Value: Plus-Minus-Total is only available for Bridge chart (also call 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. You can modify the color sequence by either of the following:
For an overview, see Using a Dataset to Control Plot Color.
Using Column label values to Apply Color By Plots
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
Symbol Color. If no symbol exists, (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.