using Imsl.Chart2D; using System.Drawing; using Imsl.Stat; public class SampleErrorBar : FrameChart { public SampleErrorBar() { Random r = new Random(123457); Chart chart = this.Chart; AxisXY axis = new AxisXY(chart); // Generate a random data set, with random errors int n = 20; double[] x = new double[n]; double[] y = new double[n]; double[] low = new double[n]; double[] high = new double[n]; for (int k = 0; k < n; k++) { x[k] = k + 1; y[k] = r.NextDouble(); low[k] = y[k] - 0.25*r.NextDouble(); high[k] = y[k] + 0.25*r.NextDouble(); } ErrorBar data = new ErrorBar(axis, x, y, low, high); data.DataType = ErrorBar.DATA_TYPE_ERROR_Y | Data.DATA_TYPE_MARKER; data.MarkerType = Data.MARKER_TYPE_FILLED_CIRCLE; data.MarkerColor = Color.Red; } public static void Main(string[] argv) { System.Windows.Forms.Application.Run(new SampleErrorBar()); } }