private void SetClusters() { //var datasetHistogram = HistogramFactory.CreateHistogram(Clusters.CreateClusterDatasetMemeberSizeHistogram(), "Dataset Members"); //var sizeHistogram = HistogramFactory.CreateHistogram(Clusters.CreateClusterSizeHistogram(), "Cluster Members"); var clustersHistogram = ScatterPlotFactory.CreateClusterMassScatterPlot(Clusters); // ClustersDatasetSizeHistogram = ImageConverter.ConvertImage(PlotImageUtility.CreateImage(datasetHistogram)); // ClusterSizeHistogram = ImageConverter.ConvertImage(PlotImageUtility.CreateImage(sizeHistogram)); ClustersImage = ImageConverter.ConvertImage(PlotImageUtility.CreateImage(clustersHistogram)); }
public void CreateClusterPlots(FeaturesClusteredEventArgs args) { // Plots: // Dataset member // Total members // Cluster scatter plot var clusters = args.Clusters; var report = Config.Report; Logger.PrintMessage("Creating Charge State Plots"); report.PushStartTable(); report.PushStartTableRow(); report.PushTextHeader("Cluster Statistics"); report.PushEndTableRow(); report.PushStartTableRow(); var path = Path.Combine(Config.AnalysisPath, PlotPath, "clusters_scatterplot.png"); var clusterScatterPlot = ScatterPlotFactory.CreateClusterMassScatterPlot(clusters); PlotImageUtility.SaveImage(clusterScatterPlot, path); report.PushImageColumn(path, WIDTH, HEIGHT); report.PushEndTableRow(); report.PushStartTableRow(); path = Path.Combine(Config.AnalysisPath, PlotPath, "clusters_datasetMembersHistogram.png"); var datasetMemberHistogram = HistogramFactory.CreateHistogram(clusters.CreateClusterDatasetMemberSizeHistogram(), "Dataset Members", "Dataset Count"); PlotImageUtility.SaveImage(datasetMemberHistogram, path); report.PushImageColumn(path, WIDTH, HEIGHT); path = Path.Combine(Config.AnalysisPath, PlotPath, "clusters_clusterSizeHistogram.png"); var clusterSizeHistogram = HistogramFactory.CreateHistogram(clusters.CreateClusterSizeHistogram(), "Cluster Members", "Cluster Size"); PlotImageUtility.SaveImage(clusterSizeHistogram, path); report.PushImageColumn(path, WIDTH, HEIGHT); report.PushEndTableRow(); report.PushEndTable(); }
private void LoadClusters(IEnumerable <UMCClusterLightMatched> clusters) { var clustersOnly = clusters.Select(cluster => cluster.Cluster).ToList(); ClustersPlotModel = ScatterPlotFactory.CreateClusterMassScatterPlot(clustersOnly); }