I've been creating heatmaps using heatmap.2() in R.
I'm using the viridis() color scale.
I used pdf() to create the output.
As you can see the color key looks different when viewing the PDF file using Adobe Acrobat (top panel) v. using Preview (bottom panel) in OS X (version 11.3.1). The Adobe Acrobat appearance is closer to what I expect. The colors in Preview appear washed out and undersaturated.
Has anyone else had this experience?
Code added after original post:
The following code generates the "washed out" color key in the heatmap:
library ('viridis')
library('gplots')
test.matrix <- matrix(ncol=25, nrow=9, -4:4)
breaks <- seq(-4,4,0.5)
pdf(file='heatmap.pdf', width=10, height=6)
heatmap.2(test.matrix, density.info = 'none', trace='none',
Colv = F, Rowv = F, dendrogram = 'none',
col=viridis(length(breaks)-1), breaks=breaks
)
dev.off()


