2.5.33 legendcat

Menu Information

Graph:Legend:Categorical Values

Brief Information

Add, update or replace categorical legend

Additional Information

Minimum Origin Version Required: 2016 SR1

Command Line Usage

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

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input Graph igl

Input

GraphLayer

<active>

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

1

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:

  • append:Append{0}
    Append the legend entries for categorical values to the existing legend (if any), even though the existing legend already contains legend entries for categorical values.
  • update:Update{1}
    Update the legend entries for categorical values in the existing legend (if any). If there are no such legend entries yet, the new legend entries for categorical values will be added to the existing legend.
  • replace:Replace{2}
    Replace the existing legend object (if any) with a legend for categorical values.
Symbol(Edge) Color edge

Input

int

1

Specify whether to show the categorical entry for symbol/edge color, if color indexing has been used.

Fill Color fill

Input

int

1

Specify whether to show the categorical entry for fill color, if color indexing has been used.

Fill Pattern fpattern

Input

int

1

Specify whether to show the categorical entry for fill pattern, if pattern indexing has been used.

Pattern Color pattern

Input

int

1

Specify whether to show the categorical entry for pattern color, if color indexing has been used.

Shape shape

Input

int

1

Specify whether to show the categorical entry for symbol shape, if shape indexing has been used.

Interior interior

Input

int

1

Specify whether to show the categorical entry for symbol interior, if interior indexing has been used.

Size size

Input

int

1

Specify whether to show the categorical entry for symbol size, if size indexing has been used.

Line Color line

Input

int

1

Specify whether to show the categorical entry for line color, if color indexing has been used.

Line Style style

Input

int

1

Specify whether to show the categorical entry for line style, if style indexing has been used.

Line Width line

Input

int

1

Specify whether to show the categorical entry for line width, if width indexing has been used.

Vector Color vline

Input

int

1

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

1

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

1

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.

Combine Elements Indexed by Same Column combine

Input

int

1

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

1

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

-1

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.

Description

Refer to the Legend for Categorical Values page in Origin Help for details about this type of legend.

Related X-Functions

legendupdate