Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14472


Ignore:
Timestamp:
12/09/16 15:59:26 (8 years ago)
Author:
pfleck
Message:

#2709 Better initial axis intervals for scatterplots.

Location:
branches/DataPreprocessing Enhancements
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs

    r14470 r14472  
    7171          comboBoxGroup.SelectedIndex = 0;
    7272          UpdateScatterPlot();
     73          if (scatterPlotControl.Content != null)
     74            foreach (var row in scatterPlotControl.Content.Rows)
     75              row.VisualProperties.PointSize = 6;
    7376        }
    7477      }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/ScatterPlotContent.cs

    r14467 r14472  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    2324using System.Linq;
    2425using HeuristicLab.Analysis;
    2526using HeuristicLab.Common;
     27using HeuristicLab.Visualization.ChartControlsExtensions;
    2628
    2729namespace HeuristicLab.DataPreprocessing {
     
    4143      IList<double> xValues = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableNameX));
    4244      IList<double> yValues = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableNameY));
     45
     46      double axisMin, axisMax, axisInterval;
     47      try {
     48        ChartUtil.CalculateOptimalAxisInterval(xValues.Min(), xValues.Max(), out axisMin, out axisMax, out axisInterval);
     49        scatterPlot.VisualProperties.XAxisMinimumAuto = false;
     50        scatterPlot.VisualProperties.XAxisMaximumAuto = false;
     51        scatterPlot.VisualProperties.XAxisMinimumFixedValue = axisMin;
     52        scatterPlot.VisualProperties.XAxisMaximumFixedValue = axisMax;
     53      } catch (ArgumentOutOfRangeException) { } // missing values lead to NaNs
     54      try {
     55        ChartUtil.CalculateOptimalAxisInterval(yValues.Min(), yValues.Max(), out axisMin, out axisMax, out axisInterval);
     56        scatterPlot.VisualProperties.YAxisMinimumAuto = false;
     57        scatterPlot.VisualProperties.YAxisMaximumAuto = false;
     58        scatterPlot.VisualProperties.YAxisMinimumFixedValue = axisMin;
     59        scatterPlot.VisualProperties.YAxisMaximumFixedValue = axisMax;
     60      } catch (ArgumentOutOfRangeException) { } // missing values lead to NaNs
     61
    4362      if (variableNameColor == null || variableNameColor == "-") {
    4463        List<Point2D<double>> points = new List<Point2D<double>>();
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj

    r14467 r14472  
    115115      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
    116116    </Reference>
     117    <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     118      <SpecificVersion>False</SpecificVersion>
     119      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Visualization.ChartControlsExtensions-3.3.dll</HintPath>
     120    </Reference>
    117121    <Reference Include="System" />
    118122    <Reference Include="System.Core" />
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Plugin.cs.frame

    r14195 r14472  
    3737  [PluginDependency("HeuristicLab.Persistence", "3.3")]
    3838  [PluginDependency("HeuristicLab.Problems.DataAnalysis","3.4")]
     39  [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")]
    3940  public class HeuristicLabDataPreprocessingPlugin : PluginBase {
    4041  }
Note: See TracChangeset for help on using the changeset viewer.