Categorical data are represented by discrete values. Such data are commonly dealt with in the biological and social sciences, examples being eye color or ranking. Origin recognizes two types of categorical data -- nominal (drug, eye color, etc.) and ordinal (performance, ranking, etc.).
Origin supports plotting of categorical data in both X and Y worksheet columns. Before plotting categorical data, you must identify your worksheet column data as Categorical data:
|
To decide whether to sort the tick labels in alphabetical order, please use system variable @CATS Note: To have @CATS take effect, it must be set before the columns set as Categorical |
Contents |
If your worksheet contains a categorical X column and one or more associated Y columns, Origin uses the X column values to create X axis tick labels. The tick marks evenly spaced along the X axis. The Y column values are plotted by X column category:


If your worksheet contains a categorical Y column, you can map categories to such things as plot symbol shape, symbol color, symbol size, or other plot attributes as in the following example:
For example, in the following figure, the A(X) and B(Y) columns are plotted using the Scatter template.


To vary plot symbol by category (east, west), open the Symbol tab of the Plot Details dialog box and edit the Symbol Color and Shape drop-down lists as shown in the following figures.

The resulting graph (see the picture below) uses the column C categories to set both symbol color and shape. In doing so, Origin alphabetizes the categories (categories starting with numeric values are first). Because color indexing was selected, Origin assigns the first category to the first color in the color list, the second category to the second color, etc. Origin performs the same alphabetic assignment for any mapped plot attribute.


To add a legend to your graph layer that conveys information about the categorical data, select Graph: Enhanced Legend.
Also, seeLegends for Categorical Data Plots in the Origin Help file.