I want to plot some lines and have them differentiated on color and linetype. If I differentiate on color alone, it's fine. If I add linetype, the line for group 14 vanishes.
(ggplot2_2.1.0, R version 3.3.1)
library(ggplot2)
g <- paste("Group", 1:14)
group <- factor(rep(g, each=14), levels=g)
x <- rep(1:14, length.out=14*14)
y <- c(runif(14*13), rep(0.55, 14))
d <- data.frame(group, x, y, stringsAsFactors=FALSE)
# Next 2 lines work fine - check the legend for Group 14
ggplot(d, aes(x, y, color=group)) +
geom_line()
# Add linetype
ggplot(d, aes(x, y, color=group, linetype=group)) +
geom_line()
# Group 14 is invisible!
What's going on?

ggplot, and the default behavior at that point is to use 'blank' for the additional lines. See what happens if you increase the number of groups even further. - ulfelder