Graph:Legend:Categorical Values
Add, update or replace categorical legend
Minimum Origin Version Required: 2016 SR1
1. legendcat igl:=[Graph1]1! mode:=2 combine:=0;//Replace the existing legend object in the first layer of Graph1, all plot attributes will be shown as separate categorical entries.
2. legendcat mode:=1 shape:=0;//Update the legend entries for categorical values in the active layer, hide the categorical entry for symbol shape.
3. legendcat auto:=1; //show category legend only and update legend automatically when categorical data changes
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input Graph | igl |
Input GraphLayer |
|
Specify the graph layer to add the legend for categorical values. It is required that this graph layer has at least one plot with color indexing or shape/size/interior indexing used. This variable is not accessible from GUI. |
Update Mode | mode |
Input int |
|
Specify how to deal with the existing legend object on the graph when the legend for categorical values is created. This variable is not accessible from GUI. Option list:
|
Symbol(Edge) Color | edge |
Input int |
|
Specify whether to show the categorical entry for symbol/edge color, if color indexing has been used. |
Fill Color | fill |
Input int |
|
Specify whether to show the categorical entry for fill color, if color indexing has been used. |
Fill Pattern | fpattern |
Input int |
|
Specify whether to show the categorical entry for fill pattern, if pattern indexing has been used. |
Pattern Color | pattern |
Input int |
|
Specify whether to show the categorical entry for pattern color, if color indexing has been used. |
Shape | shape |
Input int |
|
Specify whether to show the categorical entry for symbol shape, if shape indexing has been used. |
Interior | interior |
Input int |
|
Specify whether to show the categorical entry for symbol interior, if interior indexing has been used. |
Size | size |
Input int |
|
Specify whether to show the categorical entry for symbol size, if size indexing has been used. |
Line Color | line |
Input int |
|
Specify whether to show the categorical entry for line color, if color indexing has been used. |
Line Style | style |
Input int |
|
Specify whether to show the categorical entry for line style, if style indexing has been used. |
Line Width | line |
Input int |
|
Specify whether to show the categorical entry for line width, if width indexing has been used. |
Vector Color | vline |
Input int |
|
Specify whether to show the categorical entry for vector, if color indexing has been used for a vector plot. |
Vector Line Style | vstyle |
Input int |
|
Specify whether to show the categorical entry for vector line style, if line style indexing has been used for a vector plot. |
Distribution Fill | distfill |
Input int |
|
Specify whether to show the categorical entry for distribution curve fill, if fill color indexing has been used for a box chart with distribution curve. |
Drop Lines | dl |
Input int |
|
Specify whether to show the categorical entry for drop line, if drop line color index to a column or select Y value: Plus-Minus for a Lollipop plot. |
Combine Elements Indexed by Same Column | combine |
Input int |
|
If more than one Plot Attributes are using same indexing column, when this variable is set to 1, these Plot Attributes will be combined to be one categorical entry in the legend. If this is set to 0, they will be displayed as separate categorical entries. |
Show All Categories | ShowAll |
Input int |
|
This is only useful when user defined category(categories) are added to the indexing column in the (Column Properties) Categories tab. When this is set to 1, the manually added category(categories) will also show in the legend, otherwise, only the categories exist in indexing column will show in legend. |
Use only category legend and auto update | auto |
Input int |
|
Check this checkbox to use category legend only and the legend will be automatically updated when the categorical data changes (for example, when the filter condition changes). When it is checked, the mode variable will be ignored and it always replace/reconstruct legend. |
Refer to the Legend for Categorical Values page in Origin Help for details about this type of legend.