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 single Bar 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 SetBarColor( int ID, Nullable<Color> borderColor = null, Nullable<Color> fillColor = null )
Parameters
- ID
- Type: SystemInt32
Bar ID number[0,N], where N is number of elements Y. An integer value defines a bar ID to assign a custom color. - borderColor (Optional)
- Type: SystemNullableColor
[Optional] Border color of the single bar selected by ID, default: null - skip changing border color. - fillColor (Optional)
- Type: SystemNullableColor
[Optional] Fill color of the single bar selected by ID, default: null - skip changing fill color.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | If selected ID not exists. |
Remarks
[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(1, 10); // 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 #3 to red ilPanel1.Scene.First<BarPlot>().SetBarColor(2, fillColor: Color.Red); }
See Also