I am creating contour plots of different subsets of my data using ggplot2 stat_contour_filled function. However, for each it produces different color scales, which makes it hard to compare them. I have tried using the "breaks=" option, but for some reason it does not work. A MWE is:
library(ggplot2)
library(gridExtra)
v <- list()
v[[1]] <- ggplot(faithfuld, aes(waiting, eruptions, z = density)) + stat_contour_filled(breaks=(0:10)*0.005)
v[[2]] <- ggplot(faithfuld, aes(waiting, eruptions, z = 1.1*density)) + stat_contour_filled(breaks=(0:10)*0.005)
of = "mwe.png"
png(of)
print(do.call(grid.arrange, v))
dev.off()
It produces the following plot.
How can I get the same color levels for both contour plots?