diff --git a/code/R/teleological_properties.Rmd b/code/R/teleological_properties.Rmd index 317876f..cfe371b 100644 --- a/code/R/teleological_properties.Rmd +++ b/code/R/teleological_properties.Rmd @@ -15,6 +15,8 @@ output: ```{r, message=F} library("xtable") # for saving tables +library("png") # for reading in png files +library("grid") # for arranging plots library("emmeans") # for comparing models library("knitr") # for knitting library("RSQLite") # for reading in participants.db file @@ -293,6 +295,14 @@ df.exp2.demographics %>% ```{r fig.height=4, fig.width=8, message=FALSE, warning=FALSE} +# Read the image file +midpoint_creature = readPNG("../../figures/plot_additions/midpoint_creature.png") +left_creature = readPNG("../../figures/plot_additions/midpoint_creature.png") + +# Create a raster object from the image +raster_midpoint_creature = rasterGrob(midpoint_creature, interpolate=TRUE) +raster_left_creature = rasterGrob(left_creature, interpolate=TRUE) + ggplot(data = df.exp2.long, mapping = aes(x = property, y = response, @@ -300,28 +310,38 @@ ggplot(data = df.exp2.long, color = property, fill = property, shape = condition)) + + geom_hline(yintercept = 4, linetype = "dashed") + geom_point(position = position_jitterdodge(dodge.width = 0.5, - jitter.width = 0.1, - jitter.height = 0.0), - alpha = 0.05) + + jitter.width = 0.15, + jitter.height = 0.1), + alpha = 0.2) + theme(legend.position = "none") + stat_summary(fun.data = "mean_cl_boot", - position = position_dodge(width = 0.5), + position = position_dodge(width = 0.55), color = "black", - size = .5) + + size = .9) + scale_fill_brewer(palette = "Set1") + scale_color_brewer(palette = "Set1") + scale_y_continuous(breaks = 1:7) + scale_shape_manual(values = c(21, 23)) + - theme(plot.title = element_text(size=16, hjust = .5), + ggtitle("What is this creature?") + + xlab("Property type of creature \n\ that differed") + + theme(plot.title = element_text(size=24, hjust = .5), legend.title = element_blank(), legend.position = "bottom", - axis.title.x = element_blank()) + + axis.title.x = element_blank(), + axis.text.x = element_text(size=16), + axis.title.y = element_text(size=18), + axis.text.y = element_text(size=12), + legend.text = element_text(size=14)) + guides(fill = "none", color = "none", - shape = guide_legend(override.aes = list(fill = "gray50"))) - -ggsave(width = 5, height = 3, "../../figures/experiment2/exp2_property_by_condition_means.pdf") + shape = guide_legend(override.aes = list(fill = "gray50"))) + + coord_flip() + + annotation_custom(raster_midpoint_creature, xmin=4.35, xmax=5.3, ymin=-Inf, ymax=Inf) + + expand_limits(x = c(-Inf, 5.3)) + +# ggsave(width = 5, height = 3, "../../figures/experiment2/exp2_property_by_condition_means.pdf") ``` diff --git a/figures/experiment1/exp1_top_stacked.pdf b/figures/experiment1/exp1_top_stacked.pdf index ad0365f..ced8247 100644 Binary files a/figures/experiment1/exp1_top_stacked.pdf and b/figures/experiment1/exp1_top_stacked.pdf differ diff --git a/figures/experiment2/bert_overall_property_means.pdf b/figures/experiment2/bert_overall_property_means.pdf index 545265f..6e239bd 100644 Binary files a/figures/experiment2/bert_overall_property_means.pdf and b/figures/experiment2/bert_overall_property_means.pdf differ diff --git a/figures/experiment2/exp2_expected_property_selections_for_property_type_ratings.pdf b/figures/experiment2/exp2_expected_property_selections_for_property_type_ratings.pdf index 175645e..1338925 100644 Binary files a/figures/experiment2/exp2_expected_property_selections_for_property_type_ratings.pdf and b/figures/experiment2/exp2_expected_property_selections_for_property_type_ratings.pdf differ diff --git a/figures/experiment2/exp2_heat_map.pdf b/figures/experiment2/exp2_heat_map.pdf index ed40c60..5fe3e73 100644 Binary files a/figures/experiment2/exp2_heat_map.pdf and b/figures/experiment2/exp2_heat_map.pdf differ diff --git a/figures/experiment2/exp2_property_by_condition_means.pdf b/figures/experiment2/exp2_property_by_condition_means.pdf index 34acd17..35843e3 100644 Binary files a/figures/experiment2/exp2_property_by_condition_means.pdf and b/figures/experiment2/exp2_property_by_condition_means.pdf differ diff --git a/figures/experiment3/exp3_heat_map.pdf b/figures/experiment3/exp3_heat_map.pdf index 6d6188a..3f99785 100644 Binary files a/figures/experiment3/exp3_heat_map.pdf and b/figures/experiment3/exp3_heat_map.pdf differ diff --git a/figures/experiment3/exp3_property_by_condition_means.pdf b/figures/experiment3/exp3_property_by_condition_means.pdf index d9f2d9d..63c805d 100644 Binary files a/figures/experiment3/exp3_property_by_condition_means.pdf and b/figures/experiment3/exp3_property_by_condition_means.pdf differ diff --git a/figures/experiment4/exp4_heat_map.pdf b/figures/experiment4/exp4_heat_map.pdf index d3f248c..49bb921 100644 Binary files a/figures/experiment4/exp4_heat_map.pdf and b/figures/experiment4/exp4_heat_map.pdf differ diff --git a/figures/experiment4/exp4_property_by_condition_means.pdf b/figures/experiment4/exp4_property_by_condition_means.pdf index d72c112..1086d76 100644 Binary files a/figures/experiment4/exp4_property_by_condition_means.pdf and b/figures/experiment4/exp4_property_by_condition_means.pdf differ diff --git a/figures/plot_additions/midpoint_creature.png b/figures/plot_additions/midpoint_creature.png new file mode 100644 index 0000000..63ea22d Binary files /dev/null and b/figures/plot_additions/midpoint_creature.png differ