ILNumerics - Technical Application Development
Assembly: ILNumerics.Toolboxes.Drawing2 (in ILNumerics.Toolboxes.Drawing2.dll) Version: 5.5.0.0 (5.5.7503.3146)
Constructor defines SplinePlot on the basis of the vectors X and Y.
[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 SplinePlot( InArray<double> X, InArray<double> Y, Object tag = null, Nullable<Color> lineColor = null, DashStyle lineStyle = DashStyle.Solid, int lineWidth = 1, Nullable<Color> markerColor = null, MarkerStyle markerStyle = MarkerStyle.None, Nullable<int> resolution = 1 )
Parameters
- X
- Type: ILNumericsInArrayDouble
Vector that contains X values. - Y
- Type: ILNumericsInArrayDouble
Vector that contains Y values. - tag (Optional)
- Type: SystemObject
[optional] Tag that identifies the spline plot in the scene. - lineColor (Optional)
- Type: SystemNullableColor
[optional] Line color, default: auto. - lineStyle (Optional)
- Type: ILNumerics.DrawingDashStyle
[optional] Line style, default: solid. - lineWidth (Optional)
- Type: SystemInt32
[optional] Line width, default: 1px. - markerColor (Optional)
- Type: SystemNullableColor
[optional] Marker color, default: auto. - markerStyle (Optional)
- Type: ILNumerics.DrawingMarkerStyle
[optional] Marker style, default: none. - resolution (Optional)
- Type: SystemNullableInt32
[optional] Resolution indicates a factor of the number of additional query points that are created, default: 1.
Exceptions
Exception | Condition |
---|---|
ArgumentException | If input arguments X or Y have different sizes, or one of them is not provided. |
ArgumentException | If resolution value is less or equals 0. |
ArgumentException | If Dimension is larger than 2 and no resolution is specified. |
Remarks
Query points are the points between two key points. If the resolution is set to null, it will be calculated automatically based on the current panel size and number of visible points.
[ILNumerics Drawing2 Toolbox]
Examples
Creates and plots a smooth SplinePlot through 10 defined data points. Use this example in a Windows Forms Application project.
private void ilPanel1_Load(object sender, EventArgs e) { // define a function in 2D space Array<double> X = linspace<double>(-pi, pi, 10); Array<double> Y = sin(X); // setup the plot cube ... ilPanel1.Scene.Add(new PlotCube(twoDMode: false) { // plot original function points new LinePlot(X, Y, lineColor:Color.Blue, markerStyle: MarkerStyle.Dot), // plot smooth Spline plot new SplinePlot(X, Y, lineColor: Color.Red, markerStyle: MarkerStyle.Dot, resolution:4) }); }
See Also