How to create a fast and easy heatmap with ggplot2

The heatmaps are a tool of data visualization broadly widely used with biological data. The concept is to represent a matrix of values as colors where usually is organized by a gradient. We can find a large number of these graphics in scientific articles related with gene expressions, such as microarray or RNA-seq.

In the next example, we are going to represent a dataframe of gene expression values of 20 genes and 20 patients.

Once we have our dataframe (df_heatmap), we can visualize the values with the package ggplot2.