You are here

Heatmaps in R

In this workshop we will be going over how to generate Heatmaps, a type of visualization popular for describing high-dimensional datasets (such as genomic or spatial) through the use of colour grids. Participants will learn how to generate these maps using the heatmap() function in base R, and interactive heatmaps using the package heatmaply, which works on top of ggplot2. This workshop will be geared towards beginners.

Participants are encouraged to come in with a basic knowledge of R functions and syntax structure, as well as some basic graphical knowledge including hex colour codes. Because this workshop will be made to be as accessible as possible, we would highly encourage tentative participants to come anyway.


At bare minimum, R and RStudio. The most recent versions are preferred but because heatmap() functions remain largely the same you can stick with what you have if need be. Heatmaply requires R versions above 3.0.0 and it's dependencies.

Please run the following code ahead of time:


Small datasets will be available for you to download during the workshop, but if you need one you can definitely use mtcars. Just run



Note: This workshop is organized and facilitated by SciProg. SciProg—short for Scientific Programming Study Group—is dedicated to building a community of SFU researchers who perform computational data analysis as part of their academic work. SciProg promotes skill sharing and collaboration by (1) organizing 60 to 90-minute interactive workshops covering a wide range of software tools, (2) providing Q&A sessions for peer-to-peer assistance and collaboration, and (3) bringing researchers together at social events like Hacky Hours.


Upcoming Workshops

No upcoming instances of this workshop found.