Skip to content
Prev 274524 / 398506 Next

how to plot two surfaces with lattice::wireframe

On Fri, Oct 14, 2011 at 3:07 AM, Carl Witthoft <carl at witthoft.com> wrote:
This is reasonably simple:

fz <- matrix(complex(real = 1:100, imaginary = 101:200), 10, 10)

zr <- as.vector(row(fz))
zc <- as.vector(row(fz))
wireframe(Re(fz) + Im(fz) ~ zr + zc)

The as.vector() are needed because matrix x and y in the formula have
a special meaning.

-Deepayan