[R] Creating very small plots (2.5 cm wide) in Sweave

From: Andrew Robinson <A.Robinson_at_ms.unimelb.edu.au>
Date: Thu 08 Sep 2005 - 13:40:17 EST


Hi everyone,

I was wondering if anyone has any code they could share for creating thumbnail plots in Sweave. For example, I'd like a plot like the following:

y <- c(40, 46, 39, 44, 23, 36, 70, 39, 30, 73, 53, 74) x <- c(6, 4, 3, 6, 1, 5, 6, 2, 1, 8, 4, 6) opar <- par(mar=c(3,3,0,0))
plot(x, y, xlab="", ylab="")
abline(h=mean(y), col="red")
par(opar)

to come out about 2.5 cm wide.

Thanks for any assistance,

Andrew

-- 
Andrew Robinson
Senior Lecturer in Statistics                       Tel: +61-3-8344-9763
Department of Mathematics and Statistics            Fax: +61-3-8344-4599
University of Melbourne, VIC 3010 Australia
Email: a.robinson_at_ms.unimelb.edu.au    Website: http://www.ms.unimelb.edu.au

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Sep 08 13:45:37 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:05 EST