[R] Warnings when plotting after x11() in R 2.14.2

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun Mar 11 19:55:35 CET 2012



On 08.03.2012 21:03, Mark Seeto wrote:
> Dear R-help,
>
> I recently upgraded from R 2.13.1 to R 2.14.2 and now get warning
> messages when plotting after using x11(). Example:
>
>> plot(rnorm(10))    ### no warnings
>
>> x11(); plot(rnorm(10))
> Warning messages:
> 1: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 2: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 3: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 4: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 5: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 6: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 7: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 8: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 9: In title(...) : Font family not found in Windows font database
> 10: In title(...) : Font family not found in Windows font database
>>
>> plot(rnorm(10))    ### After using x11(), I get warnings even when x11() is not used
> There were 18 warnings (use warnings() to see them)
>> warnings()
> Warning messages:
> 1: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 2: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 3: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 4: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 5: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 6: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 7: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 8: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 9: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 10: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 11: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 12: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 13: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 14: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 15: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 16: In axis(side = side, at = at, labels = labels, ...) :
>    Font family not found in Windows font database
> 17: In title(...) : Font family not found in Windows font database
> 18: In title(...) : Font family not found in Windows font database
>
> This happens in both the 32 and 64 bit versions of R 2.14.2, and it
> also happens with ggplot2 plots. I'm using RGui on Windows 7. It did
> not happen with R 2.13.1.
>
> It's not a major problem, because the plots still appear to be
> produced correctly, but if anyone can tell me how to fix it, I'd
> appreciate it.

Use dev.new() rather than x11(). Under Windows, there is a windows() 
device but no x11() device. R tries hard to work around your user error 
(calling x11() under Windows).

Uwe Ligges


>
> Thanks,
> Mark Seeto
>
> ______________________________________________
> 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.



More information about the R-help mailing list