From ae99a0985765997e5e5b557bc677f4cc1bc84c99 Mon Sep 17 00:00:00 2001 From: karinemiras Date: Mon, 17 Feb 2020 20:55:48 +0100 Subject: [PATCH] reproducible code --- ...bots_summary_renders_journal2_tilted_big.r | 2 +- .../summary_measures_journal2_tilted_big_2.R | 23 +++++++++------- .../summary_measures_journal2_tilted_big_3.R | 27 +++++++++++-------- 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/experiments/plasticoding_frontiers2020/bestrobots_summary_renders_journal2_tilted_big.r b/experiments/plasticoding_frontiers2020/bestrobots_summary_renders_journal2_tilted_big.r index 1faba877a2..eff7bed226 100644 --- a/experiments/plasticoding_frontiers2020/bestrobots_summary_renders_journal2_tilted_big.r +++ b/experiments/plasticoding_frontiers2020/bestrobots_summary_renders_journal2_tilted_big.r @@ -19,7 +19,7 @@ gens = 200 pop = 100 num_top = 1 -analysis = 'images' +analysis = 'nonstatic/images' ##### change paths/labels/params here ##### diff --git a/experiments/plasticoding_frontiers2020/summary_measures_journal2_tilted_big_2.R b/experiments/plasticoding_frontiers2020/summary_measures_journal2_tilted_big_2.R index 834dcbb729..81216b481e 100644 --- a/experiments/plasticoding_frontiers2020/summary_measures_journal2_tilted_big_2.R +++ b/experiments/plasticoding_frontiers2020/summary_measures_journal2_tilted_big_2.R @@ -8,7 +8,7 @@ base_directory <-paste('journal2', sep='') -analysis = 'analysis_journal2_tilted_big_2' +analysis = 'nonstatic/analysis_journal2_tilted_big_2' output_directory = paste(base_directory,'/',analysis ,sep='') @@ -492,10 +492,13 @@ experiments_labels2 = c( 'Baseline: Flat' , 'Plastic: Flat') if (measures_names[i] == 'displacement_velocity_hill' ) { max_y = 2.5 min_y = -0.5} - if (measures_names[i] == 'head_balance' || measures_names[i] == 'limbs' || measures_names[i] == 'joints') { max_y = 1} - if (measures_names[i] == 'proportion' ) { max_y = 1} + if (measures_names[i] == 'head_balance' ) { + max_y = 1 + min_y = 0.6} if (measures_names[i] == 'absolute_size' ) { max_y = 16} - + if (measures_names[i] == 'recurrence' ) { max_y = 0.3} + if (measures_names[i] == 'sensors' ) { max_y = 0.3 } + if (measures_names[i] == 'sensors_reach' ) { max_y = 1 } graph = graph + labs( y=measures_labels[i], x="Generation", title="Flat Season") if (max_y>0) { @@ -534,21 +537,21 @@ experiments_labels2 = c( 'Baseline: Flat' , 'Plastic: Flat') geom_boxplot(position = position_dodge(width=0.9),lwd=2, outlier.size = 4) + labs( x="Environment", y=measures_labels[i], title="Flat Season") - max_y = 0 min_y = 0 if (measures_names[i] == 'displacement_velocity_hill' ) { - g1 = g1 + geom_hline(yintercept=1.32, linetype="dashed", color = "red") + g1 = g1 + geom_hline(yintercept=3.63, linetype="dashed", color = "red", size=2) max_y = 4.8 min_y = -0.5} - if (measures_names[i] == 'head_balance' || measures_names[i] == 'limbs' - || measures_names[i] == 'joints' || measures_names[i] == 'sensors_reach') { max_y = 1.15} + if (measures_names[i] == 'head_balance'){ + max_y = 1.15 + min_y = 0.55 + } + if (measures_names[i] == 'sensors_reach') { max_y = 1.15} if (measures_names[i] == 'recurrence' ) { max_y = 0.8} if (measures_names[i] == 'sensors' ) { max_y = 0.6} - if (measures_names[i] == 'proportion' ) { max_y = 1} if (measures_names[i] == 'absolute_size' ) { max_y = 16} - g1 = g1 + scale_color_manual(values= experiments_type_colors ) g1 = g1 + theme(legend.position="none" , text = element_text(size=45) , diff --git a/experiments/plasticoding_frontiers2020/summary_measures_journal2_tilted_big_3.R b/experiments/plasticoding_frontiers2020/summary_measures_journal2_tilted_big_3.R index 95ac49c970..aef75a5867 100644 --- a/experiments/plasticoding_frontiers2020/summary_measures_journal2_tilted_big_3.R +++ b/experiments/plasticoding_frontiers2020/summary_measures_journal2_tilted_big_3.R @@ -8,7 +8,7 @@ base_directory <-paste('journal2', sep='') -analysis = 'analysis_journal2_tilted_big_3' +analysis = 'nonstatic/analysis_journal2_tilted_big_3' output_directory = paste(base_directory,'/',analysis ,sep='') @@ -489,13 +489,16 @@ experiments_labels2 = c( 'Baseline: Tilted' , 'Plastic: Tilted') max_y = 0 min_y = 0 - if (measures_names[i] == 'displacement_velocity_hill' ) { - max_y = 2.5 + if (measures_names[i] == 'displacement_velocity_hill' ) { + max_y = 2.5 min_y = -0.5} - if (measures_names[i] == 'head_balance' || measures_names[i] == 'limbs' || measures_names[i] == 'joints') { max_y = 1} - if (measures_names[i] == 'head_balance') { min_y = 0.6 } - if (measures_names[i] == 'proportion' ) { max_y = 1} + if (measures_names[i] == 'head_balance' ) { + max_y = 1 + min_y = 0.6} if (measures_names[i] == 'absolute_size' ) { max_y = 16} + if (measures_names[i] == 'recurrence' ) { max_y = 0.3} + if (measures_names[i] == 'sensors' ) { max_y = 0.3 } + if (measures_names[i] == 'sensors_reach' ) { max_y = 1 } graph = graph + labs( y=measures_labels[i], x="Generation", title="Tilted Season") @@ -534,18 +537,20 @@ experiments_labels2 = c( 'Baseline: Tilted' , 'Plastic: Tilted') g1 <- ggplot(data=all_final_values, aes(x= type , y=values, color=type )) + geom_boxplot(position = position_dodge(width=0.9),lwd=2, outlier.size = 4) + labs( x="Environment", y=measures_labels[i], title="Tilted Season") - + max_y = 0 min_y = 0 if (measures_names[i] == 'displacement_velocity_hill' ) { - g1 = g1 + geom_hline(yintercept=1.32, linetype="dashed", color = "red") + g1 = g1 + geom_hline(yintercept=1.32, linetype="dashed", color = "red", size=2) max_y = 4.8 min_y = -0.5} - if (measures_names[i] == 'head_balance' || measures_names[i] == 'limbs' - || measures_names[i] == 'joints' || measures_names[i] == 'sensors_reach') { max_y = 1.15} + if (measures_names[i] == 'head_balance'){ + max_y = 1.15 + min_y = 0.55 + } + if (measures_names[i] == 'sensors_reach') { max_y = 1.15} if (measures_names[i] == 'recurrence' ) { max_y = 0.8} if (measures_names[i] == 'sensors' ) { max_y = 0.6} - if (measures_names[i] == 'proportion' ) { max_y = 1} if (measures_names[i] == 'absolute_size' ) { max_y = 16}