Plots were not respecting pixel ratio (retina)

This commit is contained in:
Joe Cheng
2018-01-09 12:51:04 -08:00
parent 5a352e5ace
commit f23fc3beaa

View File

@@ -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")