Description Usage Arguments Value
该程序调用fields程序库对二维场进行平滑, 首先将离散点插值到nx,ny的网格点上, 如果输入场是等经纬度网格点, 也可看成离散点, 然后插值到(nx,ny)的格点上.之后 调用image.smooth进行平滑, theta控制平滑度, 值越大越平滑. 返回为data.table 数据, 以便于ggplot绘制图像.
1 | smooth2d(x, y, z, theta = 0.03, nx = 128, ny = 128)
|
x |
: 1D vector, longitude. |
y |
: 1D vector, latitude. |
z |
: 1D vector, |
theta |
: the bandwidth or scale parameter, larger for smoother. |
nx |
: Number of grid point in X coordinate. |
ny |
: Number of grid points in Y coordinate. |
data.table, (x, y, z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.