Skip to content

Color key in heatmap.2() appears "washed out" #6

@andrewjyee

Description

@andrewjyee

This has also been posted in https://stackoverflow.com/questions/67680197/odd-appearance-of-colors-with-viridis-in-pdfs-viewed-by-preview-v-adobe

The color key created by heatmap.2() in a PDF appears "washed out" when viewed by Preview in MacOS X, but not in Adobe Acrobat.

I'm using the viridis() color scale.
I used pdf() to create the output.

I don't know if this is an issue that's related to Preview in MacOS X or is related to heatmap.2()?

The follow code generates the PDF where I see this issue.

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions