From 3a73bfb142b6d9fc64a48f23c9bcd8da14735541 Mon Sep 17 00:00:00 2001 From: Timothy Mastny Date: Thu, 21 Jun 2018 17:48:16 -0500 Subject: [PATCH] changed output coordinate system to "ndc" to account for margin changes --- R/render-plot.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/render-plot.R b/R/render-plot.R index 9cce3c9c0..09a774478 100644 --- a/R/render-plot.R +++ b/R/render-plot.R @@ -425,10 +425,10 @@ getPrevPlotCoordmap <- function(width, height) { ), # The bounds of the plot area, in DOM pixels range = list( - left = graphics::grconvertX(usrBounds[1], 'user', 'nfc') * width, - right = graphics::grconvertX(usrBounds[2], 'user', 'nfc') * width, - bottom = (1-graphics::grconvertY(usrBounds[3], 'user', 'nfc')) * height - 1, - top = (1-graphics::grconvertY(usrBounds[4], 'user', 'nfc')) * height - 1 + left = graphics::grconvertX(usrBounds[1], 'user', 'ndc') * width, + right = graphics::grconvertX(usrBounds[2], 'user', 'ndc') * width, + bottom = (1-graphics::grconvertY(usrBounds[3], 'user', 'ndc')) * height - 1, + top = (1-graphics::grconvertY(usrBounds[4], 'user', 'ndc')) * height - 1 ), log = list( x = if (graphics::par('xlog')) 10 else NULL,