Reputation: 53
I'm trying to generate a heatmap with a ton of data (1193 rows, 165 columns) and the row and column labels are coming out completely packed together, overlapping, and ugly. Accordingly, I'd like to remove them and not display any column or row labels at all.
I'm trying to use labRow = NULL
, but am getting an error message that says unused argument (labRow = NULL)
Does anyone know what I'm doing wrong, or how I can prevent the row and column labels from displaying? Below is my code.
Thanks so much!
Heatmap(filename,name="name of chart", col=colorRamp2(c(2,3,4,5,6,7,8,9),
c("firebrick4","firebrick3","firebrick1","darkorange1","gold1", "deepskyblue","dodgerblue","dodgerblue4")),
cluster_rows=FALSE,cluster_column=FALSE, labRow = NULL
Upvotes: 3
Views: 5144
Reputation: 49
Just set "fontsize_row" or "fontsize_col" to a small number (e.g., 0.001).
Upvotes: 0
Reputation: 53
I figured it out! The answer is row_names_gp = gpar(fontsize = 10)
Thanks, all!
Upvotes: 1
Reputation: 8651
I think you need to change it to labRow = FALSE
and that should fix the problem.
Upvotes: 3
Reputation: 1506
leave empty your rownames and colnames of the filename object
empty.cols = unlist(lapply(colnames(filename),function(x){
a = " "
}
)
)
empty.rows = unlist(lapply(row.names(filename),function(x){
a = " "
}
)
)
colnames(filename) = empty.cols
row.names(filename) = empty.rows
or if you want to preserve filename object names use
heatmap(filename,labRow = empty.rows, labCol = empty.cols)
Upvotes: 1