I have an expression data matrix (120X15; 15 samples and 120 genes), my heatmap looks blurred and raw names (gene names) looks very small and can not read. How can I improve my scripts?
Here is the example data
df<-structure(list(X_T0 = c(1.32606106633333, 0.222768019, 1.27419565966667, 0.293489379),
X_T1 = c(1.499956424, 0.293117217, 1.11955345266667, 0.324453864666667),
X_T2 = c(1.118528738, 0.548228048, 0.936319105, 0.846378238666667),
X_T3 = c(1.025082136, 0.841192647333333, 0.957743318666667, 1.10810667833333),
Y_T0 = c(0.424537206666667, 3.144197864, 1.01435004766667, 2.195831453),
Y_T1 = c(0.723243112666667, 0.576764958333333, 0.604810037, 0.896297411666667),
Y_T2 = c(0.335509156333333, 1.32037215366667, 1.209961935, 0.290895345333333),
Y_T3 = c(0.328275209, 1.15039119233333, 1.409758678, 0.0922298696666667),
Z_T0 = c(0.788329993666667, 1.03539976366667, 1.10523299, 0.885098106666667),
Z_T1 = c(1.125292329, 1.00032109266667, 0.877359233, 1.385935293),
Z_T2 = c(2.357924224, 0.740699933666667, 0.585095342, 1.98251017733333),
Z_T3 = c(0.678921448, 0.687992671666667, 1.005347728, 1.05829030233333)), row.names = c("AA", "PQ", "UBQ", "XY"), class = "data.frame")
Script being used
col <- colorRampPalette(c("red","yellow","darkgreen"))(30)
png("S7.png")
heatmap.2(as.matrix(df), Rowv = T, Colv = FALSE, dendrogram = "row", #scale = "row", col = col, density.info = "none", trace = "none", margins = c(7, 15) )
dev.off()
For sample data, this script generates perfect heatmap, but when I have more raw data(genes), this problem comes
I've tried to change these margins = c(7, 15) value, doesn't work well and not sure how to proceed.
Also, I want to reduce the height of the color key
I'd appreciate your help with this.