[R] Layer problem in DrawDensity3D (VecStatGraphs3D)

Duncan Murdoch murdoch.duncan at gmail.com
Fri Aug 4 16:28:06 CEST 2017


On 04/08/2017 7:52 AM, Atte Tenkanen wrote:
> Hi,
>
> When plotting the density estimation with DrawDensity3D-function (in
> package VecStatGraphs3D) it often happens that the end product ie.
> layers are not intact , see figure in the link:
>
> https://www.dropbox.com/s/vzyaiu0vso8hjw2/20623868_10213333234554853_1371245353_n.png?dl=0
>
> Can we somehow effect on that an get intact layers?
>

That package appears to be using misc3d to draw the contours. 
misc3d::contour3d requires values in a 3-d grid, and will draw open 
contours if the contours hit the boundary.

I don't know how DrawDensity3D is producing the grid of values, but 
you'd likely have to modify it to use a bigger grid around the points,
(so the density falls close to zero at the boundaries), or to 
artificially surround the density estimates with a layer of zero density 
values.

Duncan Murdoch



More information about the R-help mailing list