如何在pheatmap R包创建的热图上添加边框?

时间:2013-08-12 18:33:48

标签: r border heatmap hierarchical-clustering

我正在使用以下代码创建热图:

    pheatmap(tissuedata3,
    color = colorRampPalette(rev(c("#D73027", "#FC8D59", "#FEE090", "#FFFFBF", "#E0F3F8", "#91BFDB", "#4575B4")))(100),
    cellwidth = 20, cellheight = 2.8,
    border=TRUE,
    treeheight_row=0,
    treeheight_column=0,
    kmeans_k = NA,
    show_rownames = T, show_colnames = T,
    fontsize=2,
    scale="none",
    clustering_method = "complete",
    cluster_rows = FALSE, cluster_cols = TRUE,
    clustering_distance_rows = "euclidean", 
    clustering_distance_cols = "euclidean",
    legend=TRUE,
    )

但是,生成的热图不包含任何边框。有谁知道如何为单元格和热图整体添加边框?

1 个答案:

答案 0 :(得分:0)

我认为正确的参数是border_color,默认为“grey60”,所以我怀疑(结果不正确)你从你的参数“border”获得部分名称匹配,其值为{{1}这是[1]“白色”。

尝试:

colors()[1]