# Shows a 100-color ramp for 4 RColorBrewer palettes
par(mfrow=c(2,2), mar=c(1,1,2,1))
pals <- c("Spectral", "Greys", "Blues", "Set1")
for (i in 1:length(pals)) {
plot(1:100, 1:100, type="n", axes=FALSE, main=pals[i])
abline(v=1:100, lwd=6, col=brewer.ramp(100, pals[i]))
}
Run the code above in your browser using DataLab