If you look at this

![enter image description here](https://i.stack.imgur.com/vJEJv.png)

```
ggplot(mtcars,aes(x=disp,y=mpg,colour=mpg))+geom_line()

```

you will see that the line colour varies according to the corresponding y value, which is what I want, but only section-by-section. I would like the colour to vary continuously according to the y value. Any easy way?