# NOT RUN {
{
library(cptcity)
image(matrix(1:100), col = cpt(pal = "mpl_inferno"))
find_cpt("temperature")
image(matrix(1:100), col = cpt("idv_temperature"))
image(matrix(1:100), col = cpt("idv_temperature", rev = TRUE))
# now you can select more than one palette!!!
image(matrix(1:100),
col = cpt(pal = c("idv_temperature",
"arendal_temperature"),
rev = TRUE))
# }
# NOT RUN {
# Do not run
library(ggplot2)
ggplot(faithfuld, aes(waiting, eruptions)) +
geom_raster(aes(fill = density))
ggplot(faithfuld, aes(waiting, eruptions)) +
geom_raster(aes(fill = density)) +
scale_fill_gradientn(colours = cpt(n = 100))
# }
# NOT RUN {
}
# }
Run the code above in your browser using DataLab