0

I set the code for my heatmap with heatmap2. It return heatmap, but I want to set the top margin because in it is short. Then, I want to adjust also the size of label of the x-axis. Please help me with the code I'm new in this.

heatmap.2(scale.data1,Colv = T,
            dendrogram="column",scale="none",colsep=c(2),
            sepcolor="white",sepwidth=c(0.01),margins=c(50,30),
            col=heat.colors,trace="none",labRow = rownames(scale.data1),labCol = colnames(scale.data1), srtCol=80,
            key=T,keysize=0.80,density.info="none",symkey=FALSE,cexRow=2,ColSideColors=c("blue","green","orange","red"),lwid = c(0.2,1), lhei = c(0.5,6), 
            key.par = list(cex=0.4))
    legend("topright",legend=c("Pt1","Pt2","P3","Pt4"),col=c("blue","green","orange","red"),pch=c(15,15),cex=4,pt.cex=5,bty = "n")
par(cex.main=0.5)

I try to set par(mar = c(50, 20, 30, 30) + 0.1) but I didn't get any results.

ASN
  • 1
  • 3
    Please, share your data – Golem Aug 23 '23 at 10:47
  • try with the `margins` argument in the `heatmap.2` function , – Wael Aug 23 '23 at 12:20
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Aug 23 '23 at 13:40

0 Answers0