Thank you for your reply.
The following small code gives me two legends (one for color and one for
size). Is it possible that I only have one legend?
thick red line ---- Cubic
thin green line ---- Linear
thick blue line ----- Quadratic
Thanks,
Peng
x = 1:9
a = rep(x, 3)
b = c(x, x^2, x^3)
col = c(rep("Linear", 9), rep("Quadratic", 9), rep("Cubic", 9))
size = c(rep("Linear", 9), rep("Non-Linear", 18))
d = data.frame(a, b, col, size)
library(ggplot2)
ggplot(data = d, aes(a, b, color = col, size = size)) + geom_path() +
labs(color = "", size = "")