From f23fc3beaaf53c6c536125c8fa496e15a006ed54 Mon Sep 17 00:00:00 2001 From: Joe Cheng Date: Tue, 9 Jan 2018 12:51:04 -0800 Subject: [PATCH] Plots were not respecting pixel ratio (retina) --- R/render-plot.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/render-plot.R b/R/render-plot.R index 2e070626c..38aaf48c8 100644 --- a/R/render-plot.R +++ b/R/render-plot.R @@ -174,7 +174,7 @@ drawPlot <- function(name, session, func, width, height, pixelratio, res, ...) { # 10. On error, take width and height dependency outfile <- tempfile(fileext='.png') # If startPNG throws, this could leak. Shrug. - device <- startPNG(outfile, width, height, res = res, ...) + device <- startPNG(outfile, width*pixelratio, height*pixelratio, res = res*pixelratio, ...) domain <- createGraphicsDevicePromiseDomain(device) grDevices::dev.control(displaylist = "enable")