Ross Ihaka
2000-Jun-28 20:48 UTC
[R] Overal plot title after mfrow and .Rhistory questions.
On Wed, Jun 28, 2000 at 08:44:41PM -0700, Adrian Vance Custer wrote:> Hello everyone, > > I had a few questions that I have not been able to figure out despite a lot of > reading. > > > > 1) Adding a title to a multiplot figure: > > If I plot multiple plots with > >par(mfrow=c(2,6)) > how do I add an overall title to the figure, not the individual plots?First, you will need a place to put it -- an "outer" margin. You can set this up with: par(mfrow = c(2, 6), oma = c(0, 0, 2, 0)) This sets up an outer margin with 2 lines of text at the top of the plot. Now, you do your plots and add the title with mtext("Your Overall Title", line = 0.5, outer = TRUE) This puts the title in the center of the top margin, 0.5 lines out from the plot. With large arrays of plots like this you will get lots of blank space on the page, so you may want to play with shrinking the margins around the individual plots. Probably something like: par(mfrow = c(2, 6), oma = c(0, 0, 2, 0), mar = c(5.1, 4.1, 2.1, 2.1) This eliminates at lot of the space at the top of the individual plots.> 2) Saving histories on the fly: > 3) Setting the size .Rhistory:I'll defer to "historians" on these ones. (I agree that being able to save the current history in a file would be a good idea). Ross -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Prof Brian D Ripley
2000-Jun-28 21:33 UTC
[R] Overal plot title after mfrow and .Rhistory questions.
On Wed, 28 Jun 2000, Adrian Vance Custer wrote:> Hello everyone, > > I had a few questions that I have not been able to figure out despite a lot of > reading.Could you figure out how to tell us your platform and R version, please?> 1) Adding a title to a multiplot figure: > > If I plot multiple plots with > >par(mfrow=c(2,6)) > how do I add an overall title to the figure, not the individual plots? >[Ross has answered here]> 2) Saving histories on the fly: > > Is there a .Rhistory equivalent to > >save.image() > ? I would like to be able to save the .RData and .Rhistory files and move to > another machine. Right now I have to quit R which looses the plots I am working > on.On Windows, yes (called savehistory). Should be easy to add on Unix (non-GNOME).> 3) Setting the size .Rhistory: > > What is the maximum size of .Rhistory and where is it set?On Windows, 16K chars or 512 lines, in consolestructs.h On Unix (non-GNOME), 512 lines, in src/unix/system.c. Can be overriden by the environment variable R_HISTSIZE. GNOME: ditto, in file src/unix/gnome/system.c -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dalgaard BSA
2000-Jun-28 21:37 UTC
[R] Overal plot title after mfrow and .Rhistory questions.
Adrian Vance Custer <acuster at nopause.berkeley.edu> writes:> 2) Saving histories on the fly: > > Is there a .Rhistory equivalent to > >save.image() > ? I would like to be able to save the .RData and .Rhistory files and move to > another machine. Right now I have to quit R which looses the plots I am working > on.And while we're at it: just printing the current history would be a nice thing to have (like bash's history command). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Adrian Vance Custer
2000-Jun-29 03:44 UTC
[R] Overal plot title after mfrow and .Rhistory questions.
Hello everyone, I had a few questions that I have not been able to figure out despite a lot of reading. 1) Adding a title to a multiplot figure: If I plot multiple plots with>par(mfrow=c(2,6))how do I add an overall title to the figure, not the individual plots? 2) Saving histories on the fly: Is there a .Rhistory equivalent to>save.image()? I would like to be able to save the .RData and .Rhistory files and move to another machine. Right now I have to quit R which looses the plots I am working on. 3) Setting the size .Rhistory: What is the maximum size of .Rhistory and where is it set? Thanks in advance for any replys, --adrian acuster at nature.berkeley.edu -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._