Ricardo Rodríguez - Your XEN ICT Team
2007-Jan-02 16:02 UTC
[R] graphical parameters: margins
Hi all, Please, while using image() which is the graphical parameter which control the space between ylab and the y axis? I do need to write a number of relatively long y labels and I am not able the control, if possible, this space. See the effect I need to avoid... http://nvx.environmentalchange.net/@rrodriguez/images/overlapping.jpg Thanks for your help, Ricardo -- Ricardo Rodr?guez Your XEN ICT Team
On Tue, 2007-01-02 at 17:02 +0100, Ricardo Rodr?guez - Your XEN ICT Team wrote:> Hi all, > > Please, while using image() which is the graphical parameter which > control the space between ylab and the y axis? I do need to write a > number of relatively long y labels and I am not able the control, if > possible, this space. > > See the effect I need to avoid... > > http://nvx.environmentalchange.net/@rrodriguez/images/overlapping.jpg > > Thanks for your help, > > RicardoEither of these two gives you the answer> help.search("graphical parameters") > RSiteSearch("graphical parameters margin")more specifically, read ?par and in particular, the entry for parameter 'mar' and it's relatives. You might also need to add the axis label separately from the figure: opar <- par(mar = c(5,7,4,2) +0.1) plot(1:10, ann = FALSE) # or plot(1:10, ylab = "") mtext("label", side = 2, line = 6) par(opar) 1) opar <- par(mar = c(5,7,4,2) +0.1) creates 7.1 lines on the left of the plot and saves defaults 2) mtext("label", side = 2, line = 6) displays the axis label on line 6 to push it away from the plot axis. Repeat for other sides... 3) par(opar) resets to the defaults. HTH G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Ricardo Rodríguez - Your XEN ICT Team
2007-Jan-02 22:37 UTC
[R] graphical parameters: margins
-- Ricardo Rodr?guez Your XEN ICT Team>>> Gavin Simpson<gavin.simpson at ucl.ac.uk> 2/1/2007 17:44 >>>>Either of these two gives you the answer> help.search("graphical parameters") > RSiteSearch("graphical parameters margin")>more specifically, read ?par and in particular, the entry for parameter >'mar' and it's relatives.>You might also need to add the axis label separately from the figure:>opar <- par(mar = c(5,7,4,2) +0.1) >plot(1:10, ann = FALSE) # or plot(1:10, ylab = "") >mtext("label", side = 2, line = 6) >par(opar)>1) opar <- par(mar = c(5,7,4,2) +0.1) creates 7.1 lines on the left of >the plot and saves defaults >2) mtext("label", side = 2, line = 6) displays the axis label on line 6 >to push it away from the plot axis. Repeat for other sides... >3) par(opar) resets to the defaults.>HTHThanks Gavin, I frequently reach the help page or any other document concerning the doubt, but at least for me it is by no means easy to correctly interpret their contents without the help of more experienced people. I do hope I will catch up ASAP! Cheers, Ricardo
Ricardo Rodríguez - Your XEN ICT Team
2007-Jan-03 09:41 UTC
[R] graphical parameters: margins
>>> Prof Brian Ripley<ripley at stats.ox.ac.uk> 3/1/2007 09:22 >>>>In this particular case 'An Introduction to R' has a comprehensive >description of graphical parameters with figures (as do all good books on >S/R e.g. MASS4 - since it has the same first author).Thanks, Brian, I've reached both "Introduction to R", particularly http://cran.r-project.org/doc/manuals/R-intro.html#Figure-margins, and MASS4 at Springer website. I think it is worth I ask the Three Wise Men for MASS4 as a present! Greetings, Ricardo