setpalette {MQMF} | R Documentation |
setpalette is a shortcut for altering the palette to R4
Description
setpalette is a shortcut for changing the color palette to the R 4.0.0 default version. The R4 palette provides a less garish and a more visible set of default colours that can be called using the numbers 1 - 8. An important point is that this alters the default colours for all sessions until a restart of R. Using something similar you can define your own preferred palettes should you wish to. In addition, it can be used to revert to the old R3 default colour scheme should you wish. Alternatively, you could define your own palettes and switch between them using setpalette.
Usage
setpalette(x = "R4")
Arguments
x |
either "default", "R3", or "R4", with R4 as the default value. Use "R3" to revert back to the standard R version 3. values. |
Value
nothing but it does alter the base colour palette
Examples
setpalette("R3")
plot(1:8,rep(0.25,8),type="p",pch=16,cex=5,col=c(1:8))
text(1,0.2,"R3.0.0 - some garish or pale",cex=1.5,
font=7,pos=4)
setpalette("R4")
points(1:8,rep(0.3,8),pch=16,cex=5,col=c(1:8)) #toprow
text(1,0.325,"Default R4.0.0 - more balanced",cex=1.5,
font=7,pos=4)