In this recipe we will learn how to make a heat map showing the variation in values of one variable (z) along the X and Y axes as a grid of colors, and display a scale alongside.
We are only using the base graphics functions for this recipe. So, just open up the R prompt and type the following code. We will use the
sales.csv example dataset for this recipe. So let's first load it:
We will use the
RColorBrewer package for some good color palettes. So let's make sure it's installed and loaded:
sales dataset has monthly sales data for four cities. Let's make a heat map with the months along ...