maryam moazam
2016-Oct-03 11:43 UTC
[R] Please help with creating the improved image with pheatmap package
Hi all, I'm trying to show about 190 items using "pheatmap" package. I'm working with R 3.3.1 on windows 7. I used the following code: pheatmap(mat_data, cellwidth=20, cluster_rows = FALSE, cluster_cols FALSE, fontsize=5, fontsize_row=5, margins=c(5,10)) The resulted image is attached. Please take a look at it. As you could see, the image quality is not good, in fact, the label of each row has not been appropriately shown at all in the picture. Could you please help me how I can modify the code to improve the image? Thank you very much in advance Best regards, Maryam -------------- next part -------------- A non-text attachment was scrubbed... Name: image_pheatmap.png Type: image/png Size: 33445 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20161003/62253c76/attachment.png>
David Winsemius
2016-Oct-03 20:56 UTC
[R] Please help with creating the improved image with pheatmap package
> On Oct 3, 2016, at 4:43 AM, maryam moazam <setareh227 at gmail.com> wrote: > > Hi all, > > I'm trying to show about 190 items using "pheatmap" package. I'm working > with R 3.3.1 on windows 7. I used the following code: > > pheatmap(mat_data, cellwidth=20, cluster_rows = FALSE, cluster_cols > FALSE, fontsize=5, fontsize_row=5, margins=c(5,10)) > > > The resulted image is attached. Please take a look at it. As you could see, > the image quality is not good, in fact, the label of each row has not been > appropriately shown at all in the picture. Could you please help me how I > can modify the code to improve the image? >If png() is your desired target then you probably will want to set different plotting parameters since your image is so tall. ?grDevices ?png # guessing you need to set 'height' much higher ?par ?points # good examples of low-level control> > > > Thank you very much in advance > > Best regards, > Maryam > <image_pheatmap.png>______________________________________________ > R-help at 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.David Winsemius Alameda, CA, USA
Jim Lemon
2016-Oct-03 22:19 UTC
[R] Please help with creating the improved image with pheatmap package
Hi Maryam, Your labels have been "greeked" as the font is too small to be displayed properly. If you must use PNG format, specify your image file at least twice as high. png("pheatmap.png",width=1254,height=5000) PDF would be a better choice as you can just zoom in and scroll down. Jim On Mon, Oct 3, 2016 at 10:43 PM, maryam moazam <setareh227 at gmail.com> wrote:> Hi all, > > I'm trying to show about 190 items using "pheatmap" package. I'm working > with R 3.3.1 on windows 7. I used the following code: > > pheatmap(mat_data, cellwidth=20, cluster_rows = FALSE, cluster_cols > FALSE, fontsize=5, fontsize_row=5, margins=c(5,10)) > > > The resulted image is attached. Please take a look at it. As you could see, > the image quality is not good, in fact, the label of each row has not been > appropriately shown at all in the picture. Could you please help me how I > can modify the code to improve the image? > > > > > Thank you very much in advance > > Best regards, > Maryam > > ______________________________________________ > R-help at 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.