cols3.theme {rrMisc} | R Documentation |
Lattice color schemes with sequences of colors from light to dark 'seq..', from one color to another color 'div..' and some qualitative colors 'qual..'.
cols3.theme(...)
... |
arguments passed to further functions |
List with definition of lattice color scheme.
under continuous developement
Roland Rapold
For seq0x.theme(), qal0x.theme, and div0x.theme() see https://datavisualization.ch/inside/how-we-created-color-scales/
if(!require(lattice)&require(latticeExtra)) { print("please install packages 'lattice' and 'latticeExtra' for this example to work!") } else { par(mfrow=c(4, 1), # following parameters go c(bottom, left, top, right) oma=c(2,2,2,2)+0.1, # two rows of text at the outer left and bottom margin mar=c(1,1,2,1)+0.1, # space for one row of text at ticks and to separate plots ask=TRUE) image(x=c(1:3), y=1, z=matrix(1:3, ncol=1), col=cols3.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="cols3.theme()", cex.main=2) image(x=c(1:4), y=1, z=matrix(1:4, ncol=1), col=cols4.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="cols4.theme()", cex.main=2) image(x=c(1:7), y=1, z=matrix(1:7, ncol=1), col=cols7.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="cols7.theme()", cex.main=2) image(x=c(1:5), y=1, z=matrix(1:5, ncol=1), col=theEconomist.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="theEconomist.theme()", cex.main=2) par(mfrow=c(4, 1), # following parameters go c(bottom, left, top, right) oma=c(2,2,2,2)+0.1, # two rows of text at the outer left and bottom margin mar=c(1,1,2,1)+0.1, # space for one row of text at ticks and to separate plots ask=TRUE) image(x=c(1:9), y=1, z=matrix(1:9, ncol=1), col=seq01.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="seq01.theme()", cex.main=2) image(x=c(1:9), y=1, z=matrix(1:9, ncol=1), col=seq02.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="seq02.theme()", cex.main=2) image(x=c(1:9), y=1, z=matrix(1:9, ncol=1), col=seq03.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="seq03.theme()", cex.main=2) image(x=c(1:9), y=1, z=matrix(1:9, ncol=1), col=seq04.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="seq04.theme()", cex.main=2) par(mfrow=c(5, 1), # following parameters go c(bottom, left, top, right) oma=c(2,2,2,2)+0.1, # two rows of text at the outer left and bottom margin mar=c(1,1,2,1)+0.1, # space for one row of text at ticks and to separate plots ask=TRUE) image(x=c(1:9), y=1, z=matrix(1:9, ncol=1), col=div01.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="div01.theme()", cex.main=2) image(x=c(1:6), y=1, z=matrix(1:6, ncol=1), col=div02.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="div02.theme()", cex.main=2) image(x=c(1:9), y=1, z=matrix(1:9, ncol=1), col=div03.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="div03.theme()", cex.main=2) image(x=c(1:12), y=1, z=matrix(1:12, ncol=1), col=qual01.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="qual01.theme()", cex.main=2) image(x=c(1:6), y=1, z=matrix(1:6, ncol=1), col=qual02.theme()$superpose.polygon$col, xaxt="n", yaxt="n", xlab="", ylab="", bty="n", main="qual02.theme()", cex.main=2) }