Skip to content

Commit

Permalink
fix mesh stub
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsumner committed Jun 29, 2023
1 parent 9d11714 commit 9c0070a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Empty file added R/meshplot.R
Empty file.
6 changes: 4 additions & 2 deletions R/ximage.R
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ ximage.default <- function(x, extent = NULL, zlim = NULL, add = FALSE, ..., xlab
if (is.null(ylab)) ylab <- ""

if (is.list(extent) && length(extent) == 2) {
ximage_meshplot(x, extent, add = add)
stop("meshplot not yet supported")
#ximage_meshplot(x, extent, add = add)
}
if (!add) plot(extent[1:2], extent[3:4], type = "n", ..., xaxs = "i", yaxs = "i", xlab = xlab, ylab = ylab)
graphics::rasterImage(x, extent[1], extent[3], extent[2], extent[4], interpolate = FALSE)
Expand All @@ -206,7 +207,8 @@ ximage.nativeRaster <- function(x, extent = NULL, zlim = NULL, add = FALSE, ...,
if (is.null(ylab)) ylab <- ""

if (is.list(extent) && length(extent) == 2) {
ximage_meshplot(x, extent, add = add)
stop("meshplot not yet supported")
#ximage_meshplot(x, extent, add = add)
}
if (!add) plot(extent[1:2], extent[3:4], type = "n", ..., xaxs = "i", yaxs = "i", xlab = xlab, ylab = ylab)
graphics::rasterImage(x, extent[1], extent[3], extent[2], extent[4], interpolate = FALSE)
Expand Down
1 change: 1 addition & 0 deletions inst/examples/mesh_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,4 @@ if (plot_points) {
invisible(NULL)

}

0 comments on commit 9c0070a

Please sign in to comment.