I am trying to plot a raster with a defined colour scheme, which I take from the Rcolorbrewer package, so far no problem. The raster´s value range from 0 to 1 with no NA´s.
library(RColorBrewer)
library(classInt)
pal <- brewer.pal(n=50, name = "RdYlGn")
plot(rw_start_goal_stan, col=pal)
now I try to include quantile breaks, which I calculate using the ClassInt package
library(RColorBrewer)
library(classInt)
pal <- brewer.pal(n=50, name = "RdYlGn")
breaks.qt <- classIntervals(rw_start_goal_stan@data@values, style = "quantile")
plot(rw_start_goal_stan, breaks = breaks.qt$brks, col=pal)
incorrectly, plot() applies the colour scheme only to 50% of the value-range, the rest stays white.
what am I doing wrong?