Skip to content

multiple plot

2 messages · merser@tiscali.dk, Brian Ripley

#
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
#
[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: