Running R on Ubuntu Netbook Needs Help with Graphics Device Size

I have a small problem with the size of the graphics device when running R on an ubuntu netbook. The netbook screen size is relatively small (1024 x 576), so when I create a chart in R, just say

plot(sin)

The graph is larger than the screen size. I have to manually resize it.

The solution posted on the ubuntu forum does not work for any reason. Does anyone know how to fix this?

Thank!

+3
source share
1 answer

I no longer use Ubuntu, but I think the best solution is to put something like this in your .Rprofile file.

setHook(packageEvent("grDevices", "onLoad"),
   function(...) grDevices::X11.options(width = 4, height = 4, pointsize = 8)
)

Mac :

setHook(packageEvent("grDevices", "onLoad"),
        function(...) grDevices::quartz.options(dpi = 72))
+10

Source: https://habr.com/ru/post/1752550/


All Articles