Changeset 4394 for branches/HeuristicLab.Classification/HeuristicLab.Problems.DataAnalysis.Classfication.Views/3.3/SymbolicClassificationSolutionView.cs
- Timestamp:
- 09/15/10 13:08:12 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Classification/HeuristicLab.Problems.DataAnalysis.Classfication.Views/3.3/SymbolicClassificationSolutionView.cs
r4367 r4394 26 26 using System.Windows.Forms; 27 27 using System.Windows.Forms.DataVisualization.Charting; 28 using HeuristicLab.Common; 28 29 using HeuristicLab.MainForm; 29 30 using HeuristicLab.MainForm.WindowsForms; … … 69 70 CustomLabel trainingLabel = new CustomLabel(); 70 71 trainingLabel.Text = TrainingLabelText; 71 trainingLabel.GridTicks = GridTickTypes.TickMark;72 72 trainingLabel.FromPosition = TrainingAxisValue - TrainingTestBorder; 73 73 trainingLabel.ToPosition = TrainingAxisValue + TrainingTestBorder; … … 76 76 CustomLabel testLabel = new CustomLabel(); 77 77 testLabel.Text = TestLabelText; 78 testLabel.GridTicks = GridTickTypes.TickMark;79 78 testLabel.FromPosition = TestAxisValue - TrainingTestBorder; 80 79 testLabel.ToPosition = TestAxisValue + TrainingTestBorder; … … 160 159 row++; 161 160 } 161 UpdateCursorInterval(); 162 162 } 163 163 … … 245 245 Content.Thresholds = thresholds; 246 246 } 247 248 private void UpdateCursorInterval() { 249 Series series = chart.Series[0]; 250 double[] xValues = (from point in series.Points 251 where !point.IsEmpty 252 select point.XValue) 253 .DefaultIfEmpty(1.0) 254 .ToArray(); 255 double[] yValues = (from point in series.Points 256 where !point.IsEmpty 257 select point.YValues[0]) 258 .DefaultIfEmpty(1.0) 259 .ToArray(); 260 261 double xRange = xValues.Max() - xValues.Min(); 262 double yRange = yValues.Max() - yValues.Min(); 263 if (xRange.IsAlmost(0.0)) xRange = 1.0; 264 if (yRange.IsAlmost(0.0)) yRange = 1.0; 265 double xDigits = (int)Math.Log10(xRange) - 3; 266 double yDigits = (int)Math.Log10(yRange) - 3; 267 double xZoomInterval = Math.Pow(10, xDigits); 268 double yZoomInterval = Math.Pow(10, yDigits); 269 this.chart.ChartAreas[0].CursorX.Interval = xZoomInterval; 270 this.chart.ChartAreas[0].CursorY.Interval = yZoomInterval; 271 } 247 272 } 248 273 }
Note: See TracChangeset
for help on using the changeset viewer.