diff --git a/scripts/charts/ratio_comparison.r b/scripts/charts/combined_ratio_comparison.r similarity index 100% rename from scripts/charts/ratio_comparison.r rename to scripts/charts/combined_ratio_comparison.r diff --git a/scripts/charts/ratio_comparison_merged.r b/scripts/charts/combined_ratio_comparison_merged.r similarity index 100% rename from scripts/charts/ratio_comparison_merged.r rename to scripts/charts/combined_ratio_comparison_merged.r diff --git a/scripts/charts/ratio_comparison_merged_trap.r b/scripts/charts/combined_ratio_comparison_merged_trap.r similarity index 100% rename from scripts/charts/ratio_comparison_merged_trap.r rename to scripts/charts/combined_ratio_comparison_merged_trap.r diff --git a/scripts/charts/ratio_correlation.r b/scripts/charts/combined_ratio_correlation.r similarity index 100% rename from scripts/charts/ratio_correlation.r rename to scripts/charts/combined_ratio_correlation.r diff --git a/scripts/charts/ratio_correlation_customized.r b/scripts/charts/combined_ratio_correlation_customized.r similarity index 100% rename from scripts/charts/ratio_correlation_customized.r rename to scripts/charts/combined_ratio_correlation_customized.r diff --git a/scripts/menu.pl b/scripts/menu.pl index 565d9e5..adb77a0 100644 --- a/scripts/menu.pl +++ b/scripts/menu.pl @@ -573,24 +573,28 @@ my %handlers = ( die "No plot selected" unless @selected_charts; # Need to know which chart uses which datafile - my @faults_charts = grep { /heatmap|scatter|sankey/ } @selected_charts; + my @faults_charts = + grep { /heatmap|scatter|sankey|instr_fault_correlation/ } + @selected_charts; my @resultsdata_charts = - grep { - /result$|combined_comparison|ratio_comparison|ratio_correlation/ - } @selected_charts; + grep { /result|combined_comparison|combined_ratio/ } @selected_charts; + # Select if faults.csv or a filtered variant should be used my $faults_csv; - my $resultsdata_csv; if (@faults_charts) { $faults_csv = Util::pick_data_file( "$local_archive_dir/$selected_experiments[0]", "faults" ); } + + # Select if resultsdata.csv or a filtered variant should be used + my $resultsdata_csv; if (@resultsdata_charts) { $resultsdata_csv = Util::pick_data_file( "$local_archive_dir/$selected_experiments[0]", "resultsdata" ); } + # Plot single-experiment charts my @single_charts = grep { /single/ } @selected_charts; foreach my $experiment (@selected_experiments) { foreach my $chart (@single_charts) { @@ -600,18 +604,24 @@ my %handlers = ( "$local_charts_dir/$chart.r", "$local_archive_dir/$experiment" ); + + # If the chart is marked in @faults_charts, + # append the $faults_csv to the args push @r_args, $faults_csv - if defined $faults_csv && $chart =~ /heatmap|scatter|sankey/; + if defined $faults_csv + && grep { $_ eq $chart } @faults_charts; + + # If the chart is marked in @resultsdata_charts, + # append the $resultsdata_csv to the args push @r_args, $resultsdata_csv if defined $resultsdata_csv - && $chart =~ /result$|combined_comparison/; + && grep { $_ eq $chart } @resultsdata_charts; system(@r_args); } } my @combined_charts = - grep { /combined|ratio_comparison|ratio_correlation/ } - @selected_charts; + grep { /combined/ } @selected_charts; my $print_experiments = join " ", @selected_experiments; my @path_experiments = map { "$local_archive_dir/$_" } @selected_experiments; @@ -619,12 +629,18 @@ my %handlers = ( say " - Generating plot $chart for ($print_experiments)..."; my @r_args = ( 'Rscript', "$local_charts_dir/$chart.r", @path_experiments ); + + # If the chart is marked in @faults_charts, + # append the $faults_csv to the args push @r_args, $faults_csv - if defined $faults_csv && $chart =~ /heatmap|scatter|sankey/; + if defined $faults_csv + && grep { $_ eq $chart } @faults_charts; + + # If the chart is marked in @resultsdata_charts, + # append the $resultsdata_csv to the args push @r_args, $resultsdata_csv if defined $resultsdata_csv - && $chart =~ - /result$|combined_comparison|ratio_comparison|ratio_correlation/; + && grep { $_ eq $chart } @resultsdata_charts; system(@r_args); } },