是否可以通過多個低和高定義參數製作顏色梯度?通過2個以上定義的顏色的梯度連續縮放填充或顏色
比方說,在這樣的數據:
df <- data.frame(a = 1:100,
b = rnorm(100, mean = 1000, sd = 500))
ggplot(df) +
geom_point(aes(a, b)) +
scale_fill_continous(low = "white", high = "black")
## as "low" and "high" is all scale_fill_continous() funcion offer
設置低和高參數僅供導致線性漸變色,但我希望有更多的組合顏色漸變,允許用戶從白色變成藍色,然後黑色的說。
感謝您的關注和答覆。
'scale_fill_gradientn'可能是你在找什麼。 –