Changeset 15280 for branches/Async/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs
- Timestamp:
- 07/23/17 00:52:14 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Views (added) merged: 13397,13439,13592,13705,13711,13715,13764,13766,13938,13942,13958,13992
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs
r12509 r15280 26 26 using HeuristicLab.MainForm; 27 27 using HeuristicLab.MainForm.WindowsForms; 28 using HeuristicLab.Visualization.ChartControlsExtensions; 28 29 29 30 namespace HeuristicLab.Problems.DataAnalysis.Views { … … 35 36 private const string TEST_SERIES = "Test samples"; 36 37 38 private const int OPACITY_LEVEL = 150; 39 37 40 public new IRegressionSolution Content { 38 41 get { return (IRegressionSolution)base.Content; } … … 59 62 this.chart.TextAntiAliasingQuality = TextAntiAliasingQuality.High; 60 63 this.chart.AxisViewChanged += new EventHandler<System.Windows.Forms.DataVisualization.Charting.ViewEventArgs>(chart_AxisViewChanged); 64 65 //make series colors semi transparent 66 this.chart.ApplyPaletteColors(); 67 this.chart.Series[ALL_SERIES].Color = Color.FromArgb(OPACITY_LEVEL, this.chart.Series[ALL_SERIES].Color); 68 this.chart.Series[TRAINING_SERIES].Color = Color.FromArgb(OPACITY_LEVEL, this.chart.Series[TRAINING_SERIES].Color); 69 this.chart.Series[TEST_SERIES].Color = Color.FromArgb(OPACITY_LEVEL, this.chart.Series[TEST_SERIES].Color); 70 71 //change all markers to circles 72 this.chart.Series[ALL_SERIES].MarkerStyle = MarkerStyle.Circle; 73 this.chart.Series[TRAINING_SERIES].MarkerStyle = MarkerStyle.Circle; 74 this.chart.Series[TEST_SERIES].MarkerStyle = MarkerStyle.Circle; 61 75 62 76 //configure axis … … 156 170 double min = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetDoubleValues(targetVariableName)))).Min(); 157 171 158 max = max + 0.2 * Math.Abs(max); 159 min = min - 0.2 * Math.Abs(min); 160 161 double interestingValuesRange = max - min; 162 int digits = Math.Max(0, 3 - (int)Math.Log10(interestingValuesRange)); 163 164 max = Math.Round(max, digits); 165 min = Math.Round(min, digits); 166 167 this.chart.ChartAreas[0].AxisX.Maximum = max; 168 this.chart.ChartAreas[0].AxisX.Minimum = min; 169 this.chart.ChartAreas[0].AxisY.Maximum = max; 170 this.chart.ChartAreas[0].AxisY.Minimum = min; 172 double axisMin, axisMax, axisInterval; 173 ChartUtil.CalculateAxisInterval(min, max, 5, out axisMin, out axisMax, out axisInterval); 174 this.chart.ChartAreas[0].AxisX.Maximum = axisMax; 175 this.chart.ChartAreas[0].AxisX.Minimum = axisMin; 176 this.chart.ChartAreas[0].AxisX.Interval = axisInterval; 177 this.chart.ChartAreas[0].AxisY.Maximum = axisMax; 178 this.chart.ChartAreas[0].AxisY.Minimum = axisMin; 179 this.chart.ChartAreas[0].AxisY.Interval = axisInterval; 180 171 181 UpdateCursorInterval(); 172 182 }
Note: See TracChangeset
for help on using the changeset viewer.