Using a 2d matrix in R, how can I create a 3d surface plot, where columns=x, rows=y and the values are the heights in z?
In the example below, x values would be 1:5,
Package rgl should get you started...
rgl
require(rgl) # open renderer open3d() # plot surface rgl.surface( 1:10 , 1:10 , runif(100)) # Export to png rgl.snapshot( "sample.png" , fmt="png", top=TRUE )