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? -- Atte Tenkanen
You are more likely to get useful help if you post a reproducible example (data and code). -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Aug 4, 2017 at 4:52 AM, Atte Tenkanen <attenka at utu.fi> 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? > > -- > Atte Tenkanen > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
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