public void CreateClusterPlots(FeaturesClusteredEventArgs clusters) { Action workAction = () => { BuildClusterPlots(clusters.Clusters); Reporter.CreateClusterPlots(clusters); }; ThreadSafeDispatcher.Invoke(workAction); }
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(); }