image() from Matrix is one option.
library(Matrix)

To get the output of spy() in R, a bit more work is required.
In MATLAB (2011b):
spy() h = gcf; axObj = get(h, 'Children'); datObj = get(axObj, 'Children'); xdata = get(datObj,'XData'); ydata = get(datObj,'YData'); spyMat = [xdata; ydata]; csvwrite('spydat.csv',spyMat);
And in R:
library(Matrix) spyData <- read.csv("spydat.csv") spyMat <- t(sparseMatrix(spyData[1,],spyData[2,])) image(spyMat)

source share