ILNumerics - Technical Application Development
Assembly: ILNumerics.Toolboxes.Drawing2 (in ILNumerics.Toolboxes.Drawing2.dll) Version: 5.5.0.0 (5.5.7503.3146)
Method updates key values of each bar in bar plot.
[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
Parameters
- Y
- Type: ILNumericsInArraySingle
Vector or matrix array with new key values - X (Optional)
- Type: ILNumericsInArraySingle
[Optional] Vector or matrix defines positions of bars to draw. If not set, bars positions will be placed(or grouped) on range [1,2,..,n].
Exceptions
Exception | Condition |
---|---|
ArgumentException | If Y is null or Y has more than 2 dimensions. |
ArgumentException | If X is empty or X has more than 2 dimensions. |
ArgumentException | If X has different shape than Y |
Remarks
Method recalculates new values to draw bar plot.
If Y shape or size were changed after constructor calls, the default fill and border colors will be assigned.
See: http://ilnumerics.net/bar-plots.html for allowed shapes definitions.
[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(2, 5); // 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); }); // update bar plot with new values: result 2 groups, each 5 bars Points = pow(Points,2); ilPanel1.Scene.First<BarPlot>().Update(Points); // update bar plot with new values: result 5 groups, each 2 bars ilPanel1.Scene.First<BarPlot>().Update(Points.T); }
See Also