//display windown with scattered values private void Button_Click(object sender, RoutedEventArgs e) { ScatterSeriesWindow win = new ScatterSeriesWindow(); List<KeyValuePair<double, double>> list = new List<KeyValuePair<double, double>>(); for (int i = 0; i < importedValues.Length; i++) { list.Add(new KeyValuePair<double, double>(importedValues[i][0], importedValues[i][1])); } win.Show(); win.showChart(list, "Data distribution"); }
//display window with scattered values by cluster private void Button_Click_1(object sender, RoutedEventArgs e) { ScatterSeriesWindow win = new ScatterSeriesWindow(); List<KeyValuePair<double, double>>[] list = new List<KeyValuePair<double,double>>[numberOfClusters]; for (int i = 0; i < numberOfClusters ; i++) { list[i] = new List<KeyValuePair<double, double>>(); for(int j = 0; j < importedValues.Length; j++) { if (clusteredData[j] == i) { list[i].Add(new KeyValuePair<double, double>(importedValues[j][0], importedValues[j][1])); } } } win.Show(); win.showMultipleSeries(list , "Clusters View"); }
private void ButtonGraph2(object sender, RoutedEventArgs e) { ScatterSeriesWindow win = new ScatterSeriesWindow(); List<KeyValuePair<double, double>> list = new List<KeyValuePair<double, double>>(); for (int i = 0; i < importedValues.Length; i++) { list.Add(new KeyValuePair<double, double>(importedValues[i][0], importedValues[i][1])); } win.Show(); win.showChart(list, "Data distribution"); for (int i = 0; i < savedVolumeCoordinates.Length ; i++) { List<KeyValuePair<double, double>> point = new List<KeyValuePair<double, double>>(); point.Add(new KeyValuePair<double, double>(savedVolumeCoordinates[i][0], savedVolumeCoordinates[i][1])); if (i < savedVolumeCoordinates.Length - 1) point.Add(new KeyValuePair<double, double>(savedVolumeCoordinates[i+1][0], savedVolumeCoordinates[i+1][1])); else point.Add(new KeyValuePair<double, double>(savedVolumeCoordinates[0][0], savedVolumeCoordinates[0][1])); win.addLines(point); } }