You can either modify the cex
parameter, or, preferably, modify the dimensions of your output figure, or use a combination of these:
Create random data of dimensions 200 x 25
data <- replicate(25, rnorm(200))
rownames(data) <- paste("Gene", c(1:nrow(data)))
colnames(data) <- paste("Sample", c(1:ncol(data)))
dim(data)
[1] 200 25
Modify cex and output dimensions
pdf("pheatmap.pdf", width=5, height=12)
out <- pheatmap(data,
show_rownames=T,
cluster_cols=T,
cluster_rows=T,
scale="row",
clustering_distance_rows="euclidean",
clustering_distance_cols="euclidean",
clustering_method="complete",
border_color=FALSE,
cex=0.7)
dev.off()
-------------------------------------
Just be aware that, with that many genes, it will always be a struggle to get it exactly as you'd want it, e.g., for a publication.
Kevin
May be you can use discrete colors instead of continuous colors and breaks @OP