我怎么才能再往前挪一点呢?我在热图中使用了这样的代码:
heatmap(mat_cor_results,Rowv=NA, Colv=NA,scale="none", col=hmcols, xlab= "BBB", ylab= "CCC") ##plot heatmap离热图太近了,看起来不太好.有什么办法改变吗?

发布于 2015-07-20 11:31:24
如果您打算在xlab和ylab中移动文本,只需使用margins = c(10,10),如下代码所示:
# Data cand chart
data(mtcars)
corr_cars <- cor(mtcars)
heatmap(corr_cars, Rowv=NA, Colv=NA, scale="none", xlab= "BBB", ylab= "CCC",
margins = c(10,10))会给你以下的热图:

如果您的目的是移动值轴标签,则可以:
# Data cand chart with massive margins
data(mtcars)
corr_cars <- cor(mtcars)
# Insane space
par(mgp=c(5,5,5))
heatmap(corr_cars, Rowv=NA, Colv=NA, scale="none", xlab= "BBB", ylab= "CCC",
margins = c(10,10))这将产生:

https://stackoverflow.com/questions/31512031
复制相似问题