Hi Elham, Your image didn't get through, maybe PNG will work. Label crowding is a common problem, whether horizontal or vertical. One solution is to set a maximum length on label text (see truncString in the prettyR package). Others are to stagger labels (staxlab in plotrix) or shift them apart when crowded (spread.labels in plotrix). These functions may not work with heatmap.2 (gplots). It will be easier to suggest something if you can get your image through.
Jim On Thu, Aug 12, 2021 at 2:07 AM Elham Hooshmand <e.hooshman...@gmail.com> wrote: > > Hi, > > I am trying to draw a heatmap for my 45 topvar gene by the use of > heatmap.2, and when I set a srtRow=45 in my code(below): > > heatmap.2( assay(rld)[ topVarGenes, ], srtRow=45, scale="row",trace="none", > dendrogram="column",col = colorRampPalette( rev(brewer.pal(9, "RdBu")) > )(255)) > > row names collided with each other in a messy way. > > would you please help me to solve this problem? (also I'm a newbie beginner > using R Studio) Thank you so much > (also I attached the output image) > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.