Reputation: 1120
How can I move it a bit further ? I use such code for heatmap:
heatmap(mat_cor_results,Rowv=NA, Colv=NA,scale="none", col=hmcols, xlab= "BBB", ylab= "CCC") ##plot heatmap
It's too close to the heatmap and it doesn't look so nice... Any ideas how to change it ?
Upvotes: 0
Views: 1415
Reputation: 18585
If you intention is to move the text in xlab
and ylab
you can simply use margins = c(10,10)
, as in the code below:
# 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))
Would give you the following heatmap:
If your intention is to move the value axis labels you can do:
# 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))
which would produce:
Upvotes: 2