plotGrid: Interactive plot for 3D spatial points

Description Usage Arguments Value Examples

View source: R/plotGrid.R

Description

This is a wrapper around scatterplot3js from package threejs. The function adjusts the x, y and z axes so that 1:1:1 proportion are kept and z=0 corresponds to ground level.

Usage

1
plotGrid(grid, color = c("grey", "red")[as.factor(grid$type)], size = 0.2, ...)

Arguments

grid

A three-dimensional SpatialPoints* object

color

Point color, either a single value or vector corresponding to the number of points. The default values draws "facade" and "roof" points in different colors, assuming these classes appear in a column named type, as returned by function surfaceGrid

size

Point radius, default is 0.1

...

Additional parameters passed to scatterplot3js

Value

An htmlwidget object that is displayed using the object's show or print method. If you don't see your widget plot, try printing it with the print function. (Same as for threejs::scatterplot3js)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
grid = surfaceGrid(
  obstacles = build,
  obstacles_height_field = "BLDG_HT",
  res = 1,
  offset = 0.01
)
plotGrid(grid)

## End(Not run)

shadow documentation built on March 15, 2021, 1:07 a.m.

Related to plotGrid in shadow...