Hi @FJCC ,
I have a similar question that had not been answered here
I have made so much progress but there is only two things that I still need help with. For the purpose to keep my replay here focused on the same topic, one of my questions is about how to change the the content of facet_grid(~type+morphotype)
?
Here is a regex and my question is how to change the content of facet_wrap(~Opening_text)
to "Now Attend to Visual" , "Now Attend to Auditory"
# library was used
library(tidyverse)
library(readr)
library(ggplot2)
url <- "https://github.com/MohJumper/VisualAuditoryModality/blob/master/clean_test_master2.csv"
clean_test_master2 <- read.csv(url)
# code used
clean_test_master2 %>%
mutate(visbility_sound = case_when(
visbility == 1 & soundvolume == 0 ~ "Visual",
visbility == 0 & soundvolume == 1 ~ "Auditory",
visbility == 0 & soundvolume == 0 ~ "Empty")) %>%
mutate_at(vars(visbility_sound), factor) %>%
ggplot(aes(x = stim_ending_t, y = m, color = visbility_sound)) +
geom_line(aes(linetype = visbility_sound)) +
geom_point(aes(color = visbility_sound, shape = visbility_sound))+
xlab("Sample Durations in Seconds") + ylab("Mean responses") +
theme_bw() +
theme(legend.background = element_rect(fill = "darkgray"),
legend.key = element_rect(fill = "white", color = NA),
legend.key.size = unit(1.9, "cm"),
axis.title.y=element_text(size=15),
axis.text.x=element_text(size=15),
legend.key.width = unit(0.01,"cm")) +
facet_wrap(~Opening_text)
Note: if this is something that should not be posted here please let me know and I will happily delete my post.
Thanks