Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/05/15 12:49:01 (10 years ago)
Author:
mkommend
Message:

#2345: Merged r12365 into stable.

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.DataAnalysis.Views

  • stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs

    r12009 r12385  
    4848      chart.ChartAreas[0].AxisX.Title = "Absolute Error";
    4949      chart.ChartAreas[0].AxisX.Minimum = 0.0;
    50       chart.ChartAreas[0].AxisX.Maximum = 1.0;
     50      chart.ChartAreas[0].AxisX.Maximum = 0.0;
    5151      chart.ChartAreas[0].AxisX.IntervalAutoMode = IntervalAutoMode.VariableCount;
    5252      chart.ChartAreas[0].CursorX.Interval = 0.01;
     
    118118      solutionSeries.ChartType = SeriesChartType.FastLine;
    119119      var residuals = GetResiduals(GetOriginalValues(), GetEstimatedValues(solution));
    120      
    121       chart.ChartAreas[0].AxisX.Maximum = Math.Ceiling(residuals.Max());
     120
     121
     122      var maxValue = residuals.Max();
     123      if (maxValue >= chart.ChartAreas[0].AxisX.Maximum) {
     124        double scale = Math.Pow(10, Math.Floor(Math.Log10(maxValue)));
     125        var maximum = scale * (1 + (int)(maxValue / scale));
     126        chart.ChartAreas[0].AxisX.Maximum = maximum;
     127      }
    122128      chart.ChartAreas[0].CursorX.Interval = residuals.Min() / 100;
    123129
Note: See TracChangeset for help on using the changeset viewer.