[R] title after split.screen (was multiple plot)

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jan 8 14:00:23 CET 2004


[Please use an less vague subject line.  You are only using one of 
several wasy to get multiple plots, and not what most people mean by the 
term.  Indeed, why are you not using par(mfrow=c(3,4))? ]

I would not expect this to work, and it does not work for me with even 4
screens.  You are asking for title to write in the top margin of an
existing plot, and there is none.

Try

par(new=T); plot.new(); title(main='TITLE 1')

to ensure that you have a plotting surface set up for title to plot into.

Or, probably better, set up an outer margin and put the title there:

par(oma=c(0,0,2,0))
split.screen(figs=c(3,4))
for(i in 1:12) {screen(i); plot(1:10)}
close.screen(all=T)
title(main='TITLE 1', outer=T)

On Thu, 8 Jan 2004 merser at tiscali.dk wrote:

> hi there
> i've got this litle strange problem working with multiple plots i one screen
> the title dissapears when more than 4 images comes up
> up to 4 plots the title it shows nicely
> 
> the display is set up like:
> 
> split.screen(figs=c(3,4), erase=TRUE)
> 
> some plots
> 
> close.screen(all=T)
> 
> title(main='TITLE 1')
> 
> what am i doing wrong here
> 
> regards soren
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list