I am using qplot in the ggplot2 library to create a line graph. I am attempting to vary both the color and width of the line. The problem, though, is that the width of the line seems to be constrained, regardless of the values I give to the parameter. In the qplot function, I've also tried using "size" in place of "lwd", but this does not make a difference.
As an example, these values result in the first plot:
line.x <- c(1,2,3,4,5)
line.y <- c(1,2,3,4,5)
line.width <- c(1,2,3,4,5)
line.color <- c(1,2,3,4,5)
qplot(line.x, line.y, geom = 'line', lwd = line.width, colour = line.color) +
scale_color_gradientn(colours=rainbow(50)) +
theme(legend.position="none")
If I change the 4th value in line.width to 40, it just makes the other parts relatively thinner:
line.width <- c(1,2,3,40,5)
Increasing again to 400 has a similar effect, where the 4th segment can only be expanded to a maximum width:
line.width <- c(1,2,3,400,5)
As a note, my actual data set will have hundreds of values, and look more similar to this:

Is there a way to increase the maximum thickness of the line?


