on 05/21/2008 08:02 AM Tine wrote:
Hi!
Does anyone know hot to save (to png, pdf, ...) only plot area. That is
without box around, titles, axis, ...
I tried: par(mar=c(0,0,0,0)) and it works for internal viewer (linux and
windows).
But when I save the image in png it adds that annoying margin around
plot area.
Any ideas?
by, Tine
Is this what you want?
pdf("plot.pdf", height = 4, width = 4)
par(mar = c(0, 0, 0, 0))
plot(1:10, ann = FALSE, axes = FALSE)
dev.off()
See ?plot.default for more information on the 'ann' and 'axes' arguments.
HTH,
Marc Schwartz
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.