I'm having a strange problem. When I create ggplot plots, the background of the plots is white with no grid lines or background color (the default is usually gray) when I view the plots on my laptop. However, when I stream my display to a separate monitor the background, which appears white on my computer, appears with the normal gray background and axis lines. Does anybody have any clue as to what is going on?
The plot background appears white in the knit document as well.
Strange. What's your system setup (e.g. your OS, version of R, version of RStudio — see how to get that info in post below)?
Just so we can be sure we're running the same code, let's use this example (see reprex, below). Definitely start a fresh session to make sure you don't have anything funky going on in your environment that's somehow colliding.
So, I opened a fresh Rstudio session and ran the above code and the problem persisted. I am using R Studio Version 1.2.1206, R version 3.5.2, and Mac OS High Sierra (10.13.4 )
Note: the use of X11 (including tcltk) requires XQuartz to be installed since it is no longer part of OS X. Always re-install XQuartz when upgrading your macOS to a new major version.