Skip to content

Commit

Permalink
fix limits when xlim and ylim are provided in qscatter(); fixed first…
Browse files Browse the repository at this point in the history
… problem in #150
  • Loading branch information
yihui committed Feb 12, 2012
1 parent 7077848 commit c0febcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/qscatter.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0febcc

Please sign in to comment.