Go to TogaWare.com Home Page. Data Science Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Colour Ranges

20200608

\includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-1} \includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-2} \includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-3} \includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-4} \includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-5} \includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-6} \includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-7} \includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-8} \includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-9} \includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-10} \includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-11} \includegraphics[width=0.2\textwidth]{figures/onepager/graphics:color_ramps-12}

Automatic colour ranges are supported using grDevices::palette(), as the default palette. A contiguous colour palette is available as grDevices::cm.colors(), with a rainbow available as grDevices::rainbow(). Others palletes includegrDevices::gray(), which provides a gray scale, colorRamps::blue2green2red(), and RColorBrewer::brewer.pal().

blue2green2red(15)
##  [1] "#0000CC" "#0000FF" "#0055FF" "#00AAFF" "#00FFFF" "#2BFFD5" "#55FFAA"
##  [8] "#80FF80" "#AAFF55" "#D4FF2B" "#FFFF00" "#FFAA00" "#FF5500" "#FF0000"
## [15] "#CC0000"

Use graphics::image() to display the colour plots as above.

image(matrix(1:80,  10), col=palette())
image(matrix(1:100, 10), col=cm.colors(10))
image(matrix(1:100, 10), col=rainbow(10))
image(matrix(1:60,  10), col=gray(seq(0.1, 0.9, len=6)))
image(matrix(1:150, 10), col=blue2green2red(15))
image(matrix(1:110, 10), col=brewer.pal(11, "PRGn"))
image(matrix(1:110, 10), col=brewer.pal(11, "RdBu"))
image(matrix(1:80,  10), col=brewer.pal(8,  "Accent"))
image(matrix(1:80,  10), col=brewer.pal(8,  "Dark2"))
image(matrix(1:90,  10), col=brewer.pal(9,  "Pastel1"))
image(matrix(1:120, 10), col=brewer.pal(12, "Paired"))
image(matrix(1:120, 10), col=brewer.pal(12, "Set3"))


Support further development by purchasing the PDF version of the book.
Other online resources include the GNU/Linux Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 2000-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.