// private void NullGraph() // { // object [] ar = new object[3]; // // DataTable table = new DataTable(); // // table.Columns.Add("GroupName",typeof(int)); // table.Columns.Add("my_X",typeof(int)); // table.Columns.Add("my_Y",typeof(int)); // // DataRow row = table.NewRow(); // ar[0] = "1"; // ar[1] = 0; // ar[2] = 0; // row.ItemArray = ar; // table.Rows.Add(row); // // ultraChart1.DataSource = table; // ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small; // ultraChart1.ScatterChart.ConnectWithLines = true; // } public void GraphDraw_Step() { DataPlotter.DataSeries pSeries1; //plotter1.ColorBg = Color.LightYellow; plotter1.ColorGrid = Color.LightGray; //plotter1.XLogBase = 0; plotter1.XRangeStart = 0; plotter1.XRangeEnd = 8000; plotter1.XGrid = 1000; //plotter1.YLogBase = 0; plotter1.YRangeStart = 0; plotter1.YRangeEnd = 1; plotter1.YGrid = 0.2; plotter1.Series.Clear(); plotter1.bIsColorMap = true; plotter1.IsOctave = true; bool DataExist = false; plotter1.Series.Clear(); if (SAClass1 != null) { #region 예전 // object [] ar = new object[3]; // // DataTable table = new DataTable(); // // table.Columns.Add("GroupName",typeof(int)); // table.Columns.Add("my_X",typeof(double)); // table.Columns.Add("my_Y",typeof(double)); #endregion // Z 값을 구한다 SAClass1.Cal_Z_Data(); for (int i = 0; i < SAClass1.Sgraph.Count; i++) { ClsData cls = (ClsData)SAClass1.Sgraph[i]; pSeries1 = new DataPlotter.DataSeries(); pSeries1.Name = "Data 01"; pSeries1.Color = Color.Blue; #region 예전 // for(int j = 0 ; j < cls.GetCount() ; j++) // { // DataRow row = table.NewRow(); // ar[0] = i.ToString(); // ar[1] = cls.GetData(j).ToString(); // ar[2] = cls.GetData(j).ToString(); // row.ItemArray = ar; // table.Rows.Add(row); // } #endregion pSeries1.XData = SAClass1.Frequency.GetData(); pSeries1.YData = cls.GetData(); // Z 값을 넣는다 pSeries1.ZData = new double[1]; pSeries1.ZData[0] = SAClass1.Get_Z_Data(i); DataExist = true; plotter1.Series.Add(pSeries1); } if (DataExist == true) { #region 예전 // ultraChart1.DataSource = table; // ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small; // ultraChart1.ScatterChart.ConnectWithLines = true; #endregion plotter1.YLabel = "Parameter Value"; plotter1.Interval = 2; plotter1.AutoRange(); plotter1.Refresh(); } } }