meshgrid | R Documentation |
Generate two matrices for use in three-dimensional plots.
meshgrid(x, y = x)
x |
numerical vector, represents points along the x-axis. |
y |
numerical vector, represents points along the y-axis. |
The rows of the output array X are copies of the vector x; columns of the output array Y are copies of the vector y.
Returns two matrices as a list with X
and Y
components.
The three-dimensional variant meshgrid(x, y, z)
is not yet implemented.
outer
meshgrid(1:5)$X
meshgrid(c(1, 2, 3), c(11, 12))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.