[R] problem with png()

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Nov 15 11:30:55 CET 2007


Works for me when I add the library(lattice) you omitted ....

Since effectively all png() is doing is copying the screen, the problem is 
unlikely to be in png().  Most such problems are when there is not enough 
space to include labels, and you need to adjust margins or pointsize.

On Thu, 15 Nov 2007, Ingo Holz wrote:

> Hi,
>
> I am runing R2.6.0 (2007-10-03) on WindowsXP.
>
> If I use png() to save a plot I lose the main title.
>
> An example:
>
> ##########################
> outfile <- "outfile.png"
>
> p11 <- histogram( ~ height | voice.part, data = singer, xlab="Height",
> main="Ingo's title")
> p2 <- histogram( ~ height, data = singer, xlab = "Height")
>
> png(outfile, width=800, height=800)
> print(p11, split=c(1,1,1,2), more=TRUE)
> print(p2, split=c(1,2,1,2))
> dev.off()
>
> ########################
>
> In my "outfile.png" I do not see "Ingo's title".
> I know that it is not possible to reproduce this "error" on LINUX.

It seems not possible on Windows, either.

> Thank you for your help.
> Ingo
>
> ______________________________________________
> R-help at 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.
>

-- 
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