I was using the pheatmap to cluster all the samples and do the visualization, but i was confused that how to increase the size legend which shows like that.
Take a back up of your code posted above, and try plotting with this basic code (OP code). If you can see the legend, then keep optimizing heatmap. I think unoptimized cell and other parameters are issue here in code (as data is not furnished) :
try increasing plot area. For any such questions, posting example data and code will help people to understand issue and post answer @ biologo
To continue with @cpad0112's answer, you can try;
where x and y values you can play around to find the best size.
THKs,i tried it, but seems doesn't work
sorry, it;s my fault. i try many ways to increase the size of legend(not the label), but all faild. the code like: