Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14441


Ignore:
Timestamp:
12/02/16 13:43:34 (8 years ago)
Author:
pfleck
Message:

#2709 Copied plugins.

Location:
branches/DataPreprocessing Enhancements
Files:
5 edited
2 copied

Legend:

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

    r14185 r14441  
    101101        series.IsVisibleInLegend = i < 2; //only first two series are visible, non-missing and missing values
    102102        series.Color = i % 2 == 0 ? colorNonMissingValue : colorMissingValue;
     103        series.IsValueShownAsLabel = true;
    103104
    104         var values = yValuesPerColumn.Select(y => i < y.Count ? y[i] : 0).ToArray();
     105        // use NaN to indicate "no value" instead of zero-range datapoints
     106        var values = yValuesPerColumn.Select(y => (i < y.Count && y[i] != 0) ? y[i] : double.NaN).ToArray();
    105107        series.Points.DataBindY(values);
    106108        chart.Series.Add(series);
     
    139141        }
    140142        yValues.Add(valueCount);
    141         if (missingState) //handle last missing
     143        if (missingState) //handle last missing    why?
    142144        {
    143           yValues.Add(0);
     145          //yValues.Add(0);
    144146        }
    145147        columnsYValues.Add(yValues);
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj

    r14381 r14441  
    353353      <Private>False</Private>
    354354    </ProjectReference>
     355  </ItemGroup>
     356  <ItemGroup>
     357    <EmbeddedResource Include="ScatterPlotSingleView.resx">
     358      <DependentUpon>ScatterPlotSingleView.cs</DependentUpon>
     359    </EmbeddedResource>
    355360  </ItemGroup>
    356361  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs

    r14185 r14441  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.scatterPlotView = new HeuristicLab.DataPreprocessing.Views.PreprocessingScatterPlotView();
     47      this.scatterPlotControl = new HeuristicLab.Analysis.Views.ScatterPlotControl();
    4848      this.groupBox1 = new System.Windows.Forms.GroupBox();
     49      this.label3 = new System.Windows.Forms.Label();
    4950      this.label2 = new System.Windows.Forms.Label();
    5051      this.label1 = new System.Windows.Forms.Label();
     52      this.comboBoxColor = new System.Windows.Forms.ComboBox();
    5153      this.comboBoxYVariable = new System.Windows.Forms.ComboBox();
    5254      this.comboBoxXVariable = new System.Windows.Forms.ComboBox();
    53       this.label3 = new System.Windows.Forms.Label();
    54       this.comboBoxColor = new System.Windows.Forms.ComboBox();
    5555      this.groupBox1.SuspendLayout();
    5656      this.SuspendLayout();
    5757      //
    58       // scatterPlotView
     58      // scatterPlotControl
    5959      //
    60       this.scatterPlotView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    61             | System.Windows.Forms.AnchorStyles.Left)
     60      this.scatterPlotControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     61            | System.Windows.Forms.AnchorStyles.Left) 
    6262            | System.Windows.Forms.AnchorStyles.Right)));
    63       this.scatterPlotView.Caption = "ScatterPlot View";
    64       this.scatterPlotView.Content = null;
    65       this.scatterPlotView.Location = new System.Drawing.Point(169, 3);
    66       this.scatterPlotView.Name = "scatterPlotView";
    67       this.scatterPlotView.ReadOnly = false;
    68       this.scatterPlotView.Size = new System.Drawing.Size(689, 509);
    69       this.scatterPlotView.TabIndex = 0;
     63      this.scatterPlotControl.Content = null;
     64      this.scatterPlotControl.Location = new System.Drawing.Point(169, 3);
     65      this.scatterPlotControl.Name = "scatterPlotControl";
     66      this.scatterPlotControl.Size = new System.Drawing.Size(689, 509);
     67      this.scatterPlotControl.TabIndex = 0;
    7068      //
    7169      // groupBox1
     
    8381      this.groupBox1.TabStop = false;
    8482      this.groupBox1.Text = "Options";
     83      //
     84      // label3
     85      //
     86      this.label3.AutoSize = true;
     87      this.label3.Location = new System.Drawing.Point(17, 141);
     88      this.label3.Name = "label3";
     89      this.label3.Size = new System.Drawing.Size(31, 13);
     90      this.label3.TabIndex = 3;
     91      this.label3.Text = "Color";
    8592      //
    8693      // label2
     
    101108      this.label1.TabIndex = 2;
    102109      this.label1.Text = "X Variable";
     110      //
     111      // comboBoxColor
     112      //
     113      this.comboBoxColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     114      this.comboBoxColor.FormattingEnabled = true;
     115      this.comboBoxColor.Location = new System.Drawing.Point(20, 164);
     116      this.comboBoxColor.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3);
     117      this.comboBoxColor.Name = "comboBoxColor";
     118      this.comboBoxColor.Size = new System.Drawing.Size(121, 21);
     119      this.comboBoxColor.TabIndex = 1;
     120      this.comboBoxColor.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged);
    103121      //
    104122      // comboBoxYVariable
     
    124142      this.comboBoxXVariable.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged);
    125143      //
    126       // label3
    127       //
    128       this.label3.AutoSize = true;
    129       this.label3.Location = new System.Drawing.Point(17, 141);
    130       this.label3.Name = "label3";
    131       this.label3.Size = new System.Drawing.Size(31, 13);
    132       this.label3.TabIndex = 3;
    133       this.label3.Text = "Color";
    134       //
    135       // comboBoxColor
    136       //
    137       this.comboBoxColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    138       this.comboBoxColor.FormattingEnabled = true;
    139       this.comboBoxColor.Location = new System.Drawing.Point(20, 164);
    140       this.comboBoxColor.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3);
    141       this.comboBoxColor.Name = "comboBoxColor";
    142       this.comboBoxColor.Size = new System.Drawing.Size(121, 21);
    143       this.comboBoxColor.TabIndex = 1;
    144       this.comboBoxColor.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged);
    145       //
    146144      // ScatterPlotSingleView
    147145      //
     
    149147      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    150148      this.Controls.Add(this.groupBox1);
    151       this.Controls.Add(this.scatterPlotView);
     149      this.Controls.Add(this.scatterPlotControl);
    152150      this.Name = "ScatterPlotSingleView";
    153151      this.Size = new System.Drawing.Size(863, 517);
     
    160158    #endregion
    161159
    162     private HeuristicLab.DataPreprocessing.Views.PreprocessingScatterPlotView scatterPlotView;
     160    private HeuristicLab.Analysis.Views.ScatterPlotControl scatterPlotControl;
    163161    private System.Windows.Forms.GroupBox groupBox1;
    164162    private System.Windows.Forms.Label label2;
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs

    r14185 r14441  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using System.Windows.Forms;
    2526using HeuristicLab.Analysis;
    2627using HeuristicLab.Core.Views;
     
    7778    protected override void OnContentChanged() {
    7879      base.OnContentChanged();
     80
     81      comboBoxXVariable.Items.Clear();
     82      comboBoxYVariable.Items.Clear();
     83      comboBoxColor.Items.Clear();
    7984      if (Content != null) {
    8085        InitData();
     
    8893    private void UpdateScatterPlot() {
    8994      if (comboBoxXVariable.SelectedItem != null && comboBoxYVariable.SelectedItem != null && comboBoxColor.SelectedItem != null) {
    90         //get scatter plot with selected x and y variable
    91         ScatterPlot scatterPlot = Content.CreateScatterPlot(
    92           (string)comboBoxXVariable.SelectedItem,
    93           (string)comboBoxYVariable.SelectedItem,
    94           (string)comboBoxColor.SelectedItem);
    95         scatterPlotView.Content = scatterPlot;
     95        var xVariable = (string) comboBoxXVariable.SelectedItem;
     96        var yVariable = (string) comboBoxYVariable.SelectedItem;
     97        var colorVariable = (string) comboBoxColor.SelectedItem;
     98
     99        ScatterPlot scatterPlot = Content.CreateScatterPlot(xVariable, yVariable, colorVariable);
     100
     101        var vp = scatterPlot.VisualProperties;
     102        vp.Title = string.Empty;
     103        vp.XAxisTitle = xVariable;
     104        vp.YAxisTitle = yVariable;
     105
     106
     107        scatterPlotControl.Content = scatterPlot;
    96108
    97109        //save selected x and y variable in content
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/ScatterPlotContent.cs

    r14185 r14441  
    6969
    7070        ScatterPlotDataRow scdr = new ScatterPlotDataRow(variableNameX + " - " + variableNameY, "", points);
     71        scdr.VisualProperties.IsVisibleInLegend = false;
    7172        scatterPlot.Rows.Add(scdr);
    7273
     
    8384            "",
    8485            values.Select(v => new Point2D<double>(v.x, v.y)),
    85             new ScatterPlotDataRowVisualProperties() { Color = gradients[curGradient] });
     86            new ScatterPlotDataRowVisualProperties() { Color = gradients[curGradient], });
    8687          curGradient += gradients.Count / numColors;
    8788          scatterPlot.Rows.Add(row);
Note: See TracChangeset for help on using the changeset viewer.