Hi all, In the following example, #--------------EXAMPLE------------------ test <- function(subfigure) { plot(c(1:10),c(1:10),cex=4) text(1,9,subfigure,cex=10) } m <- matrix(c(1,2,5,5,3,4,5,5),4,2) layout(m) test("a") test("b") test("c") test("d") test("e") #--------------------------------------- Is it possible to have the font (a,b,...,e) and pch sizes (including the axis-label, tick and tick-label sizes) scaled proportionally with the size of each plot when I put multiple plots on the same page? Thanks in advance!! Regards Tempo
Hi Pisut Tempatarachoke wrote:> Hi all, > > In the following example, > > #--------------EXAMPLE------------------ > test <- function(subfigure) > { > plot(c(1:10),c(1:10),cex=4) > text(1,9,subfigure,cex=10) > } > m <- matrix(c(1,2,5,5,3,4,5,5),4,2) > layout(m) > test("a") > test("b") > test("c") > test("d") > test("e") > #--------------------------------------- > > Is it possible to have the font (a,b,...,e) and pch sizes (including the > axis-label, tick and tick-label sizes) scaled proportionally with the > size of each plot when I put multiple plots on the same page?When you have multiple figures, R tries to think for you and reduces the "base" size of text. You can explicitly control this base size through par(). Does the following slight modification of your example do what you want? test <- function(subfigure) { plot(c(1:10),c(1:10),cex=4) text(1,9,subfigure,cex=10) } m <- matrix(c(1,2,5,5,3,4,5,5),4,2) layout(m) test("a") test("b") test("c") test("d") par(cex=1) test("e") Paul -- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 paul at stat.auckland.ac.nz http://www.stat.auckland.ac.nz/~paul/
Paul Murrell wrote:> Hi > > > Pisut Tempatarachoke wrote: > >> Hi all, >> >> In the following example, >> >> #--------------EXAMPLE------------------ >> test <- function(subfigure) >> { >> plot(c(1:10),c(1:10),cex=4) >> text(1,9,subfigure,cex=10) >> } >> m <- matrix(c(1,2,5,5,3,4,5,5),4,2) >> layout(m) >> test("a") >> test("b") >> test("c") >> test("d") >> test("e") >> #--------------------------------------- >> >> Is it possible to have the font (a,b,...,e) and pch sizes (including >> the axis-label, tick and tick-label sizes) scaled proportionally with >> the size of each plot when I put multiple plots on the same page? > > > > When you have multiple figures, R tries to think for you and reduces the > "base" size of text. You can explicitly control this base size through > par(). Does the following slight modification of your example do what > you want? > > test <- function(subfigure) > { > plot(c(1:10),c(1:10),cex=4) > text(1,9,subfigure,cex=10) > } > m <- matrix(c(1,2,5,5,3,4,5,5),4,2) > layout(m) > test("a") > test("b") > test("c") > test("d") > par(cex=1) > test("e") > > PaulHi Paul, Sorry for taking so long to reply. Your suggestion worked right away but I have been busily caught up with other things. Again, thank you very much for your help. Best regards Pisut