Changeset 4721
- Timestamp:
- 11/05/10 12:55:17 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBoxPlotView.Designer.cs
r4709 r4721 46 46 private void InitializeComponent() { 47 47 this.components = new System.ComponentModel.Container(); 48 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 49 System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); 48 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 49 System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); 50 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RunCollectionBoxPlotView)); 50 51 this.xAxisLabel = new System.Windows.Forms.Label(); 51 52 this.xAxisComboBox = new System.Windows.Forms.ComboBox(); … … 55 56 this.noRunsLabel = new System.Windows.Forms.Label(); 56 57 this.splitContainer = new System.Windows.Forms.SplitContainer(); 58 this.showStatisticsCheckBox = new System.Windows.Forms.CheckBox(); 57 59 this.statisticsGroupBox = new System.Windows.Forms.GroupBox(); 60 this.statisticsMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView(); 58 61 this.tooltip = new System.Windows.Forms.ToolTip(this.components); 59 this.statisticsMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView();60 62 ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit(); 61 63 this.splitContainer.Panel1.SuspendLayout(); … … 112 114 | System.Windows.Forms.AnchorStyles.Left) 113 115 | System.Windows.Forms.AnchorStyles.Right))); 114 chartArea 2.Name = "ChartArea1";115 this.chart.ChartAreas.Add(chartArea 2);116 chartArea1.Name = "ChartArea1"; 117 this.chart.ChartAreas.Add(chartArea1); 116 118 this.chart.Location = new System.Drawing.Point(6, 30); 117 119 this.chart.Name = "chart"; 118 series 2.ChartArea = "ChartArea1";119 series 2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.BoxPlot;120 series 2.IsVisibleInLegend = false;121 series 2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;122 series 2.Name = "DataSeries";123 series 2.YValuesPerPoint = 6;124 this.chart.Series.Add(series 2);120 series1.ChartArea = "ChartArea1"; 121 series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.BoxPlot; 122 series1.IsVisibleInLegend = false; 123 series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; 124 series1.Name = "DataSeries"; 125 series1.YValuesPerPoint = 6; 126 this.chart.Series.Add(series1); 125 127 this.chart.Size = new System.Drawing.Size(534, 217); 126 128 this.chart.TabIndex = 17; … … 148 150 // splitContainer.Panel1 149 151 // 152 this.splitContainer.Panel1.Controls.Add(this.showStatisticsCheckBox); 150 153 this.splitContainer.Panel1.Controls.Add(this.xAxisLabel); 151 154 this.splitContainer.Panel1.Controls.Add(this.noRunsLabel); … … 161 164 this.splitContainer.SplitterDistance = 277; 162 165 this.splitContainer.TabIndex = 23; 166 // 167 // showStatisticsCheckBox 168 // 169 this.showStatisticsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 170 this.showStatisticsCheckBox.Appearance = System.Windows.Forms.Appearance.Button; 171 this.showStatisticsCheckBox.Checked = true; 172 this.showStatisticsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 173 this.showStatisticsCheckBox.Image = ((System.Drawing.Image)(resources.GetObject("showStatisticsCheckBox.Image"))); 174 this.showStatisticsCheckBox.Location = new System.Drawing.Point(6, 245); 175 this.showStatisticsCheckBox.Name = "showStatisticsCheckBox"; 176 this.showStatisticsCheckBox.Size = new System.Drawing.Size(24, 24); 177 this.showStatisticsCheckBox.TabIndex = 23; 178 this.tooltip.SetToolTip(this.showStatisticsCheckBox, "Show/Hide Statistics"); 179 this.showStatisticsCheckBox.UseVisualStyleBackColor = true; 180 this.showStatisticsCheckBox.CheckedChanged += new System.EventHandler(this.showStatisticsCheckBox_CheckedChanged); 163 181 // 164 182 // statisticsGroupBox … … 219 237 private System.Windows.Forms.GroupBox statisticsGroupBox; 220 238 private System.Windows.Forms.ToolTip tooltip; 239 protected System.Windows.Forms.CheckBox showStatisticsCheckBox; 221 240 } 222 241 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBoxPlotView.cs
r4652 r4721 182 182 183 183 private void UpdateStatistics() { 184 DoubleMatrix matrix = new DoubleMatrix( 6, seriesCache.Count);184 DoubleMatrix matrix = new DoubleMatrix(7, seriesCache.Count); 185 185 matrix.SortableView = false; 186 186 List<string> columnNames = new List<string>(); … … 207 207 } 208 208 matrix.ColumnNames = columnNames; 209 matrix.RowNames = new string[] { " Mean", "Median", "Standard deviation", "Variance", "25th percentile", "75th percentile" };209 matrix.RowNames = new string[] { "Count", "Average", "Median", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile" }; 210 210 211 211 for (int i = 0; i < seriesCache.Count; i++) { 212 212 Series series = seriesCache.ElementAt(i).Value; 213 213 double[] seriesValues = series.Points.Select(p => p.YValues[0]).OrderBy(d => d).ToArray(); 214 matrix[0, i] = seriesValues.Average(); 215 matrix[1, i] = seriesValues.Median(); 216 matrix[2, i] = seriesValues.StandardDeviation(); 217 matrix[3, i] = seriesValues.Variance(); 218 matrix[4, i] = seriesValues.Percentile(0.25); 219 matrix[5, i] = seriesValues.Percentile(0.75); 214 matrix[0, i] = seriesValues.Length; 215 matrix[1, i] = seriesValues.Average(); 216 matrix[2, i] = seriesValues.Median(); 217 matrix[3, i] = seriesValues.StandardDeviation(); 218 matrix[4, i] = seriesValues.Variance(); 219 matrix[5, i] = seriesValues.Percentile(0.25); 220 matrix[6, i] = seriesValues.Percentile(0.75); 220 221 } 221 222 statisticsMatrixView.Content = matrix; … … 404 405 #endregion 405 406 407 private void showStatisticsCheckBox_CheckedChanged(object sender, EventArgs e) { 408 splitContainer.Panel2Collapsed = !showStatisticsCheckBox.Checked; 409 } 410 406 411 } 407 412 }
Note: See TracChangeset
for help on using the changeset viewer.