Skip to content

Commit

Permalink
fixes 436
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Jul 24, 2017
1 parent 3ade280 commit aadf1f4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ plot.sfc_POINT = function(x, y, ..., pch = 1, cex = 1, col = 1, bg = 0, lwd = 1,
bg = rep(bg, length.out = npts)
cex = rep(cex, length.out = npts)
mat = do.call(rbind, x)
ne = apply(mat, 1, function(x) all(is.finite(x))) # ne: not empty
points(mat[ne,, drop = FALSE], pch = pch[ne], col = col[ne], bg = bg[ne], cex = cex[ne], lwd = lwd, lty = lty,
type = type)
if (!is.null(mat)) {
ne = apply(mat, 1, function(x) all(is.finite(x))) # ne: not empty
points(mat[ne,, drop = FALSE], pch = pch[ne], col = col[ne], bg = bg[ne],
cex = cex[ne], lwd = lwd, lty = lty, type = type)
}
}

#' @name plot
Expand Down

1 comment on commit aadf1f4

@edzer
Copy link
Member Author

@edzer edzer commented on aadf1f4 Jul 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes #436

Please sign in to comment.