ILNumerics - Technical Application Development
Assembly: ILNumerics.Toolboxes.Drawing2 (in ILNumerics.Toolboxes.Drawing2.dll) Version: 5.5.0.0 (5.5.7503.3146)
Method sets custom border and fill color to group of bars by ID.
[ILNumerics Drawing2 Toolbox]
Namespace: ILNumerics.Drawing.Plotting
Assembly: ILNumerics.Toolboxes.Drawing2 (in ILNumerics.Toolboxes.Drawing2.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax
public void SetGroupColor( int ID, Nullable<Color> borderColor = null, Nullable<Color> fillColor = null )
Parameters
- ID
- Type: SystemInt32
Group ID number[0,n]. An integer value defines a group ID to assign a custom color. - borderColor (Optional)
- Type: SystemNullableColor
[Optional] Border color of the bar group selected by ID, default: null - skip changing border color. - fillColor (Optional)
- Type: SystemNullableColor
[Optional] Fill color of the bar group selected by ID, default: null - skip changing fill color.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | If selected ID not exists. |
Remarks
If bar plot is defined with vector array, SetGroupColor, sets a color to all bars. ID must be equal 0.
If bar plot is defined with matrix, SetGroupColor, sets a color to whole bar group, defined by ID.
[ILNumerics Drawing2 Toolbox]
Examples
Example creates and draws BarPlot
private void ilPanel1_Load(object sender, EventArgs e) { // define a random set of points Array<double> Points = rand(3, 4); // setup the plot cube ... ilPanel1.Scene.Add(new PlotCube(twoDMode: false) { // draw bar plot, by default all bars will be filled with blue color new BarPlot(Points, barWidth: 0.6f, style: BarPlot.BarPlotStyle.grouped, draw3DBars: true); }); // change fill color of bar group #3 to red ilPanel1.Scene.First<BarPlot>().SetGroupColor(2, fillColor: Color.Red); }
See Also