Still getting to grips with ggplot. My question: How do I manually change the line size? I've tried with scale_size_manual but it didn't seem to work.
setup:
test.mat <- data.frame(matrix(nrow=32, ncol =3))
test.mat[,1] = rep(1:16,2)
test.mat[1:16,2] = as.character(rep("Cohort Alpha"),16)
test.mat[17:32,2] = as.character(rep("Factor Alpha"), 16)
test.mat[,3] = rnorm(32,0,1)
colnames(test.mat) = c("Window", "type", "value")
ggplot(test.mat, aes(x=Window, y=value)) +
geom_line(aes(colour = type, linetype = type)) +
theme_classic() +
scale_colour_manual("type", values = c("black", "steelblue")) +
scale_linetype_manual("type", values = c("solid", "solid")) +
scale_size_manual("type", values = c(5, 1.4), guide = "none")


sizein geom_line? Most functions have a size argument anyways. Unless you have some other size mapping in mind, using thesizearg should suffice.scale_size_manualis having no effect because you do not have asizeaesthetic in yourggplot. Addsize=typeinside theaes(...)argument.iris %>% ggplot(aes(Sepal.Length, size=Species, y=Petal.Length,color=Species))+ geom_point()+ geom_line()+ scale_size_manual(values=c(1,2,17))