From c0febcce2d42fe6ef5feccba2ecc30efa6b564a1 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Sun, 12 Feb 2012 17:02:13 -0600 Subject: [PATCH] fix limits when xlim and ylim are provided in qscatter(); fixed first problem in #150 --- R/qscatter.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/qscatter.R b/R/qscatter.R index 528a8b5..537eca7 100644 --- a/R/qscatter.R +++ b/R/qscatter.R @@ -77,7 +77,8 @@ qscatter = meta$xy[, 2] = data[, meta$yvar] idx = visible(data)[meta$order] x = meta$xy[idx, 1]; y = meta$xy[idx, 2] - meta$xat = axis_loc(x); meta$yat = axis_loc(y) + meta$xat = axis_loc(if (is.null(xlim)) x else xlim) + meta$yat = axis_loc(if (is.null(ylim)) y else ylim) meta$xlabels = format(meta$xat); meta$ylabels = format(meta$yat) meta$xlab = if (is.null(xlab)) meta$xvar else xlab meta$ylab = if (is.null(ylab)) meta$yvar else ylab