ILNumerics Ultimate VS

Legend Constructor (Group, IEnumerableString, Object, LegendItem, Label)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Create legend object for automatic configuration

[ILNumerics Visualization Engine]

Namespace:  ILNumerics.Drawing.Plotting
Assembly:  ILNumerics.Drawing (in ILNumerics.Drawing.dll) Version: ILNumerics Ultimate VS 4
Syntax

public Legend(
	Group root = null,
	IEnumerable<string> labels = null,
	Object tag = null,
	LegendItem style = null,
	Label labelStyle = null
)

Parameters

root (Optional)
Type: ILNumerics.DrawingGroup
[optional] root node of the subtree considered for finding legend items automatically. Default: plot cube this legends is in.
labels (Optional)
Type: System.Collections.GenericIEnumerableString
[optional] label text strings for all items to be displayed
tag (Optional)
Type: SystemObject
[optional] tag used to identify this object in the scene. Default: DefaultLabelTag.
style (Optional)
Type: ILNumerics.Drawing.PlottingLegendItem
[Optional] preconfigured legend item providing the default style for all items in the legend, including future items added dynamically. If provided, labelStyle is ignored.
labelStyle (Optional)
Type: ILNumerics.DrawingLabel
[Optional] preconfigured label providing the default styles for all labels in the legend. Default: null (the label contained in [!:style] or standard labels will be used).
Remarks

The number of created items depends on the number of elements in labels and the number of plot objects found in the plot cube. The iteration of suitable plot objects below root is walked. Every object gets a new legend item associated to it; the label text is taken from the corresponding element in labels. If the corresponding element in labels is null, the Tag property of the plot object is used as label text instead.

If root is null, the collection of suitable plot objects is acquired from the subtree of the first plot cube in the scene, which lays on the path from the legend up to the scene root at time of rendering. If the number of suitable objects found is n, the number of legend items created is min(labels.Count, n). If labels is string[0] (empty array) no items are created. If labels is null (default), items for all suitable objects are created.

Not all plot objects are suitable objects for display in a legend. Examples of suitable objects are line plots and contour plots.

When style is not null the legend item provided determines the style of all items, including the labels in the legend and labelStyle is ignored.

[ILNumerics Visualization Engine]

See Also

Reference