Uselinetypeandsizearguments in ggplot2 : # Create some datax <-1:10; y1 <- x*x; y2 <-2*y1 df <- data.frame( x = c(x, x), y = c(y1, y2), grp = as.factor(rep(c("A","B"), each =10)) )# Plotlibrary(ggplot2) ggplot(