- Timestamp:
- 05/21/14 15:28:27 (10 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs
r10867 r10882 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.Data; 29 using HeuristicLab.Common; 29 30 30 31 namespace HeuristicLab.DataPreprocessing { … … 60 61 row.VisualProperties.ChartType = chartType; 61 62 return row; 62 }63 64 private void ReplaceNANwithZero(IList<double> values) {65 for (int i = 0; i < values.Count; i++) {66 if (Double.IsNaN(values[i]))67 values[i] = 0;68 }69 63 } 70 64 … … 148 142 } 149 143 144 public ScatterPlot CreateScatterPlot(string name, string variableNameX, string variableNameY) { 145 ScatterPlot scatterPlot = new ScatterPlot(name, ""); 146 147 148 List<double> xValues = GetVariableValues(variableNameX); 149 List<double> yValues = GetVariableValues(variableNameY); 150 151 List<Point2D<double>> points = new List<Point2D<double>>(); 152 153 for( int i = 0; i < xValues.Count; i++) 154 { 155 Point2D<double> point = new Point2D<double>(xValues[i],yValues[i]); 156 points.Add(point); 157 } 158 159 ScatterPlotDataRow scdr = new ScatterPlotDataRow(variableNameX + " - " + variableNameY,"",points); 160 scatterPlot.Rows.Add(scdr); 161 return scatterPlot; 162 } 163 150 164 #endregion 151 165 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ScatterPlotContent.cs
r10867 r10882 26 26 namespace HeuristicLab.DataPreprocessing { 27 27 28 [Item(" LineChart", "Represents the line chart grid.")]29 public class LineChartContent : PreprocessingChartContent {28 [Item("ScatterPlot", "Represents a scatter plot.")] 29 public class ScatterPlotContent : PreprocessingChartContent { 30 30 31 public LineChartContent(IChartLogic chartlogic)31 public ScatterPlotContent(IChartLogic chartlogic) 32 32 : base(chartlogic) { 33 33 } 34 34 35 public LineChartContent(LineChartContent content, Cloner cloner)35 public ScatterPlotContent(ScatterPlotContent content, Cloner cloner) 36 36 : base(content, cloner) { 37 37 … … 43 43 44 44 public override IDeepCloneable Clone(Cloner cloner) { 45 return new LineChartContent(this, cloner);45 return new ScatterPlotContent(this, cloner); 46 46 } 47 47
Note: See TracChangeset
for help on using the changeset viewer.