image size - How to make bigger images
3
0
Entering edit mode
Assa Yeroslaviz ★ 1.5k
@assa-yeroslaviz-1597
Last seen 25 days ago
Germany
Hi, I have a problem with my heat maps. I have a matrix of 222x2 of GO categories. I am using the heatmap.2 package to output an image. either a png or pdf. My problem is that the labels on the x axis are to many ,so that I can't read them. I would like to make the single item size bigger (row size), so that I will be able to differentiate between the single lables. But I didn't find how to do it. I tried to change the par(mar = c(3, 3, 2, 5), oma = c(3,2,2,6)) and also to make the resolution and sizes of my image bigger png("image.png",res=600,height=2600,width=2600) But none of these parameters has change the size of the single rows I still can't read my labels. Is there a way of making the image bigger? THX Assa [[alternative HTML version deleted]]
GO GO • 3.0k views
ADD COMMENT
0
Entering edit mode
Heidi Dvinge ★ 2.0k
@heidi-dvinge-2195
Last seen 10.2 years ago
Hi Assa, from your post it's not completely clear to me whether it's the figure itself that's too small, or the writing in the row labels. If it's the latter, then have a look at the cexRow parameter in heatmap.2 for increasing the font size. HTH \Heidi > Hi, > > I have a problem with my heat maps. > > I have a matrix of 222x2 of GO categories. I am using the heatmap.2 > package > to output an image. either a png or pdf. > > My problem is that the labels on the x axis are to many ,so that I can't > read them. > > I would like to make the single item size bigger (row size), so that I > will > be able to differentiate between the single lables. > > But I didn't find how to do it. > > I tried to change the > > par(mar = c(3, 3, 2, 5), oma = c(3,2,2,6)) > > > and also to make the resolution and sizes of my image bigger > > png("image.png",res=600,height=2600,width=2600) > > > But none of these parameters has change the size of the single rows I > still > can't read my labels. > > Is there a way of making the image bigger? > > THX > Assa > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT
0
Entering edit mode
Hi Heidi, Yes, I know and used this option. But to be able to see all my labels, I need to use a cexRow=0.2 and it still didn't help much. I am adding the image to show how it looks with cexRow=0.2. For that reason I would like to increase the idth of the single lines. This way I can use a bigger cexRow and still the line won't overlap. THX Assa On Mon, Apr 11, 2011 at 11:11, Heidi Dvinge <heidi at="" ebi.ac.uk=""> wrote: > Hi Assa, > > from your post it's not completely clear to me whether it's the figure > itself that's too small, or the writing in the row labels. If it's the > latter, then have a look at the cexRow parameter in heatmap.2 for > increasing the font size. > > HTH > \Heidi > > > Hi, > > > > I have a problem with my heat maps. > > > > I have a matrix of 222x2 of GO categories. I am using the heatmap.2 > > package > > to output an image. either a png or pdf. > > > > My problem is that the labels on the x axis are to many ,so that I can't > > read them. > > > > I would like to make the single item size bigger (row size), so that I > > will > > be able to differentiate between the single lables. > > > > But I didn't find how to do it. > > > > I tried to change the > > > > par(mar = c(3, 3, 2, 5), oma = c(3,2,2,6)) > > > > > > and also to make the resolution and sizes of my image bigger > > > > png("image.png",res=600,height=2600,width=2600) > > > > > > But none of these parameters has change the size of the single rows I > > still > > can't read my labels. > > > > Is there a way of making the image bigger? > > > > THX > > Assa > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor at r-project.org > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: > > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > > >
ADD REPLY
0
Entering edit mode
Heidi Dvinge ★ 2.0k
@heidi-dvinge-2195
Last seen 10.2 years ago
Hi Assa, you'll probably just have to play around with the parameters (file size and cexRow) until you find something to your liking. For example, the following works for me, although with 200 rows you'll have to zoom in on the pdf to read the labels. library(gplots) data <- matrix(rnorm(400, mean = 0, sd = 1), ncol=2) pdf("heatmap_test.pdf", height=10, width=5) heatmap.2(data, trace="none", labRow=paste("row", 1:200, sep="_"), lhei=c(0.7,5), cexRow=0.35, mar=c(2,3), density.info="none") dev.off() \Heidi > Here is the image again, I think the first one as too big > > On Mon, Apr 11, 2011 at 11:30, Assa Yeroslaviz <frymor at="" gmail.com=""> wrote: > >> Hi Heidi, >> >> Yes, I know and used this option. But to be able to see all my labels, I >> need to use a cexRow=0.2 and it still didn't help much. >> >> I am adding the image to show how it looks with cexRow=0.2. >> >> For that reason I would like to increase the idth of the single lines. >> This >> way I can use a bigger cexRow and still the line won't overlap. >> >> THX >> Assa >> >> >> On Mon, Apr 11, 2011 at 11:11, Heidi Dvinge <heidi at="" ebi.ac.uk=""> wrote: >> >>> Hi Assa, >>> >>> from your post it's not completely clear to me whether it's the figure >>> itself that's too small, or the writing in the row labels. If it's the >>> latter, then have a look at the cexRow parameter in heatmap.2 for >>> increasing the font size. >>> >>> HTH >>> \Heidi >>> >>> > Hi, >>> > >>> > I have a problem with my heat maps. >>> > >>> > I have a matrix of 222x2 of GO categories. I am using the heatmap.2 >>> > package >>> > to output an image. either a png or pdf. >>> > >>> > My problem is that the labels on the x axis are to many ,so that I >>> can't >>> > read them. >>> > >>> > I would like to make the single item size bigger (row size), so that >>> I >>> > will >>> > be able to differentiate between the single lables. >>> > >>> > But I didn't find how to do it. >>> > >>> > I tried to change the >>> > >>> > par(mar = c(3, 3, 2, 5), oma = c(3,2,2,6)) >>> > >>> > >>> > and also to make the resolution and sizes of my image bigger >>> > >>> > png("image.png",res=600,height=2600,width=2600) >>> > >>> > >>> > But none of these parameters has change the size of the single rows I >>> > still >>> > can't read my labels. >>> > >>> > Is there a way of making the image bigger? >>> > >>> > THX >>> > Assa >>> > >>> > [[alternative HTML version deleted]] >>> > >>> > _______________________________________________ >>> > Bioconductor mailing list >>> > Bioconductor at r-project.org >>> > https://stat.ethz.ch/mailman/listinfo/bioconductor >>> > Search the archives: >>> > http://news.gmane.org/gmane.science.biology.informatics.conductor >>> > >>> >>> >>> >> >
ADD COMMENT
0
Entering edit mode
Hi I am not sure if this helps here specifically, but in general you can also try with varying (increasing) the parameter 'pointsize' of the 'png' function. Best wishes Wolfgang Heidi Dvinge scripsit 11/04/11 13:56: > Hi Assa, > > you'll probably just have to play around with the parameters (file size > and cexRow) until you find something to your liking. For example, the > following works for me, although with 200 rows you'll have to zoom in on > the pdf to read the labels. > > library(gplots) > data <- matrix(rnorm(400, mean = 0, sd = 1), ncol=2) > pdf("heatmap_test.pdf", height=10, width=5) > heatmap.2(data, trace="none", labRow=paste("row", 1:200, sep="_"), > lhei=c(0.7,5), cexRow=0.35, mar=c(2,3), density.info="none") > dev.off() > > > \Heidi > >> Here is the image again, I think the first one as too big >> >> On Mon, Apr 11, 2011 at 11:30, Assa Yeroslaviz<frymor at="" gmail.com=""> wrote: >> >>> Hi Heidi, >>> >>> Yes, I know and used this option. But to be able to see all my labels, I >>> need to use a cexRow=0.2 and it still didn't help much. >>> >>> I am adding the image to show how it looks with cexRow=0.2. >>> >>> For that reason I would like to increase the idth of the single lines. >>> This >>> way I can use a bigger cexRow and still the line won't overlap. >>> >>> THX >>> Assa >>> >>> >>> On Mon, Apr 11, 2011 at 11:11, Heidi Dvinge<heidi at="" ebi.ac.uk=""> wrote: >>> >>>> Hi Assa, >>>> >>>> from your post it's not completely clear to me whether it's the figure >>>> itself that's too small, or the writing in the row labels. If it's the >>>> latter, then have a look at the cexRow parameter in heatmap.2 for >>>> increasing the font size. >>>> >>>> HTH >>>> \Heidi >>>> >>>>> Hi, >>>>> >>>>> I have a problem with my heat maps. >>>>> >>>>> I have a matrix of 222x2 of GO categories. I am using the heatmap.2 >>>>> package >>>>> to output an image. either a png or pdf. >>>>> >>>>> My problem is that the labels on the x axis are to many ,so that I >>>> can't >>>>> read them. >>>>> >>>>> I would like to make the single item size bigger (row size), so that >>>> I >>>>> will >>>>> be able to differentiate between the single lables. >>>>> >>>>> But I didn't find how to do it. >>>>> >>>>> I tried to change the >>>>> >>>>> par(mar = c(3, 3, 2, 5), oma = c(3,2,2,6)) >>>>> >>>>> >>>>> and also to make the resolution and sizes of my image bigger >>>>> >>>>> png("image.png",res=600,height=2600,width=2600) >>>>> >>>>> >>>>> But none of these parameters has change the size of the single rows I >>>>> still >>>>> can't read my labels. >>>>> >>>>> Is there a way of making the image bigger? >>>>> >>>>> THX >>>>> Assa >>>>> >>>>> [[alternative HTML version deleted]] >>>>> >>>>> _______________________________________________ >>>>> Bioconductor mailing list >>>>> Bioconductor at r-project.org >>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>> Search the archives: >>>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>>> >>>> >>>> >>>> >>> >> > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Wolfgang Huber EMBL http://www.embl.de/research/units/genome_biology/huber
ADD REPLY
0
Entering edit mode
Amos Folarin ▴ 80
@amos-folarin-4200
Last seen 10.2 years ago
Hi Assa, I'm guessing here that your labels are overlapping. You need to look at the cexRow and cexCol (e.g. cexRow=0.07 ), this will let you change the font size of the columns. If you save the heatmap as a pdf the row and column labels are scalable, this will let you inspect the labels that are too small by zooming in. x <- (matrix(1:9,3)) heatmap.2(x) #smaller row labels x11(); heatmap.2(x, lhei=0.5) #The dimensions of the grid automatically scale with the dimensions of the window. x11(10,10); heatmap.2(x, cexRow=0.5) Amos Folarin ---------- Forwarded message ---------- From: Assa Yeroslaviz <frymor@gmail.com> To: bioconductor <bioconductor@stat.math.ethz.ch> Date: Mon, 11 Apr 2011 11:06:48 +0200 Subject: [BioC] image size - How to make bigger images Hi, I have a problem with my heat maps. I have a matrix of 222x2 of GO categories. I am using the heatmap.2 package to output an image. either a png or pdf. My problem is that the labels on the x axis are to many ,so that I can't read them. I would like to make the single item size bigger (row size), so that I will be able to differentiate between the single lables. But I didn't find how to do it. I tried to change the par(mar = c(3, 3, 2, 5), oma = c(3,2,2,6)) and also to make the resolution and sizes of my image bigger png("image.png",res=600, height=2600,width=2600) But none of these parameters has change the size of the single rows I still can't read my labels. Is there a way of making the image bigger? THX Assa [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 508 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6