示例#1
0
        public Radar(NNData data)
        {
            InitializeComponent();
            data      = TemperatureMap.Check(data);
            this.data = data;

            tableLayoutPanel1.Controls.Clear();
            tableLayoutPanel1.ColumnStyles.Clear();
            tableLayoutPanel1.RowStyles.Clear();
            this.WindowState = FormWindowState.Maximized;
            tableLayoutPanel1.ColumnCount = 5;
            tableLayoutPanel1.RowCount    = 5;
            for (int i = 0; i < 5; i++)
            {
                tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 200f / data.Num));
                tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 200f / data.Num));
            }

            chart = new Chart[5, 5];

            for (int i = 0; i < 5; i++)
            {
                for (int j = 0; j < 5; j++)
                {
                    Chart     chart1     = new Chart();
                    ChartArea chartArea1 = new ChartArea();
                    chartArea1.Name = "ChartArea1";
                    chart1.ChartAreas.Add(chartArea1);
                    ((System.ComponentModel.ISupportInitialize)(chart1)).BeginInit();
                    chart1.BorderlineColor     = System.Drawing.Color.Black;
                    chart1.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
                    chart1.Size = new System.Drawing.Size(400, 400);
                    chart[i, j] = chart1;
                    tableLayoutPanel1.Controls.Add(chart[i, j], i, j);
                    chart1.ChartAreas[0].AxisY.Maximum = 1;
                }
            }

            charts_filling(ref chart, data, ref num);
        }
示例#2
0
文件: Sitka.cs 项目: strorch/mat_stat
        public Sitka(NNData data)
        {
            InitializeComponent();
            chart1.Series.Clear();
            data = TemperatureMap.Check(data);
            chart1.ChartAreas[0].AxisX.Maximum = data.Num - 1;
            chart1.ChartAreas[0].AxisX.Minimum = 0;
            chart1.ChartAreas[0].AxisY.Maximum = 1;
            chart1.ChartAreas[0].AxisY.Minimum = 0;
            double[] arr_max = data.arr_max;

            for (int i = 0; i < data.Length; i++)
            {
                chart1.Series.Add(i.ToString());
                chart1.Series[i.ToString()].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
                chart1.Series[i.ToString()].Color     = Color.Blue;
                for (int j = 0; j < data.Num; j++)
                {
                    chart1.Series[i.ToString()].Points.AddXY(j, data.ARR[i, j] / arr_max[j]);
                }
            }
        }