To match what you see on screen with the plot panel or zoom, set the dpi to the ppi of your monitor, and adjust the size accordingly.
I want an image that is 107x50mm at 300 dpi, which is
> c(107,50)/25.5*300
[1] 1258.8235 588.2353
in pixels
to get that to match what I see in my plot zoom (with window scaled to desired size), I need to use
ggsave(file="myPath/plotName.jpg", plot=tmpPlotsGrouped, scale=1,
units="px", width=1259, height=588, dpi=105)