Решение с использованием ggplot2:
library(ggplot2)
#Some sample data
x <- sort(runif(100))
dat <- data.frame(x = x,y = x^2 + 1)
# Some external vector for the color scale
col <- sort(rnorm(100))
qplot(x, y, data=dat, colour=col) + scale_colour_gradient(low="red", high="blue")
[/g0]
Проверьте это в документации, здесь: https://laravel.com/docs/5.8/authorization#authorizing-actions-via-gates