Following code produces a plot, however, we got several feedback that the plot wasn't shown in RStudio. One solution usually is to resize the plot window to make it larger, but this often didn't work for some users.
library(performance)
library(see)
data(mtcars)
mod <- lm(mpg ~ disp + cyl, data = mtcars)
plot(performance::check_model(mod), debug = TRUE)
While I had no problems producing the plots with 100% scaling, I got an error when I set the scaling to 125% and the plot window was too small. Given that some users with high resolutions probably have set the scaling to a higher value than 100%, RStudio generally fails to show the plots, simply due to the scale-setting.
Is there any way to resolve this issue from RStudio side?
There are two videos demonstrating the effects: works, scaling 100%
Maybe I should add that this problem might (not 100% sure) be related when multiple plots are put together using the patchwork package (like in the example above). User feedback suggests that "single" (ggplot2) plots work fine.
I got this reply, which actually "solves" this issue:
It is only partly because of patchwork. The issue comes because there is not enough area for the plot elements as you zoom in and this is exasperated by putting more plot elements in the plot with patchwork. Some elements in a ggplot2 plot have absolute sizes, e.g. all text elements and by extensions the areas that are defined to have enough space for these elements (titles, axes, etc). As you zoom, these absolute areas increase in size and at some point there is simple not enough room in the plot area to contain them all, which is when you get this error.