1

次の R コードがあるとします。

require(lattice)
x <- c(1:10)
y <- c(1:10)
g <- expand.grid(x = 1:10, y = 1:10, gr = 1:2)
g$z <- c(as.vector(outer(x,y,"*")), rep(50,100))
wireframe(z ~ x * y, data = g, groups = gr)

結果として得られるサーフェスの交差は、グリッド線に沿っているため見苦しくなります。

サーフェス間の交差をより見栄え良くする方法はありますか (グリッドの解像度を上げる以外に)? たぶん、いくつかのパラメーターを渡すか、視覚化のために別のパッケージを使用しますか?

4

1 に答える 1

0

Well, since I couldn't resist goofing off, here are a few possiblities for ways to smooth your data.

The package scvm appears to have some 2D model-fitting tools.

The fields package is recommended here: How can I smooth an array in R?

The DiceKriging package is reviewed here: https://stats.stackexchange.com/questions/13510/fitting-multivariate-natural-cubic-spline

于 2013-12-13T12:45:54.457 に答える