Re: [S] Q: plotting multiple graphs of different sizes on one page

Christian Keller (ckeller@aicos.com)
Thu, 30 Apr 1998 17:04:04 +0200


"Raphael Kuznetsovski" <rkuznetsovski@lan813.ehsg.saic.com> wrote:

>> ...
>> For example, what should I do to generate
>> two plots on one page so that the first plot
>> would cover 75% of the plotting area and
>> the second plot would cover the rest (25%)?

There at least two possibilities:

## Method 1: with the fig argument of par --> see help(par)
frame() # begin a new figure
par(fig=c(0,1,0,0.75))
tsplot(sunspot)
par(fig=c(0,1,0.65,1))
tsplot(lynx)
par(fig=c(0,1,0,1)) # reset fig to default

## Method 2: if you use trellis graphics --> see help(print.trellis)
trellis.device(motif)
print(bwplot(Type ~ Mileage, data=fuel.frame), position=c(0,0,1,0.7),
more=T)
print(xyplot(Mileage ~ Weight, data=fuel.frame), position=c(0,0.6,1,1))

You might also be interested in the examples in help(split.screen).

I hope this helps.
Christian

-- 
----------------------------------------------------------
Christian Keller		Tel:      +41 61 686 98 81
AICOS Technologies AG		Fax:      +41 61 686 98 88
Efringerstrasse 32	        email:   ckeller@aicos.com
CH-4057 Basel, Switzerland      Web: http://www.aicos.com/
----------------------------------------------------------
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news