Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4972 for trunk/sources


Ignore:
Timestamp:
11/28/10 12:39:13 (13 years ago)
Author:
gkronber
Message:

Fixed bug in scatter plot view. #1286

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ScatterPlotView.cs

    r4651 r4972  
    141141        double min = Math.Min(Content.EstimatedValues.Min(), dataset.GetVariableValues(targetVariableName).Min());
    142142
    143         max = Math.Ceiling(max) * 1.2;
    144         min = Math.Floor(min) * 0.8;
     143        max = max + 0.2 * Math.Abs(max);
     144        min = min - 0.2 * Math.Abs(min);
     145
     146        double interestingValuesRange = max - min;
     147        int digits = Math.Max(0, 3 - (int)Math.Log10(interestingValuesRange));
     148
     149        max = Math.Round(max, digits);
     150        min = Math.Round(min, digits);
    145151
    146152        this.chart.ChartAreas[0].AxisX.Maximum = max;
Note: See TracChangeset for help on using the changeset viewer.