18: Display array data as surface, contour, density plot

1. Read 24×32 elevation data from file e.dat
2. Display as a surface (3d) plot
3. Display as a contour map
4. Display as a density plot (black=lowest, white=highest)

Mathematica:

(1)
elev = ReadList["e.dat",Table[Number,32]];

(2)
ListPlot3D[elev];

(3)
ListContourPlot[elev];

(4)
ListDensityPlot[elev,Mesh->False];

Matlab:

(1)
fid = fopen('e.dat');
edata = fscanf(fid, '%f', [24,32]);

(2)
surf(edata);   or
mesh(edata);

(3)
contour(edata);   or
meshc(edata);

(4)
pcolor(edata);
colormap(gray);
shading interp;

Maple:

(1)
with(plots):
V:= fscanf("/full/path/e.txt","%fm");
A:= convert(V[1],listlist):

(2)
listplot3d(A);

(3)
listcontplot(A);

(4)
listdensityplot(A);

IDL:

(1)
elev = fltarr(32,24)
OpenR, 13, 'e.dat'
ReadF, 13, elev
Close, 13

(2)
surface, elev
shade_surf, elev

(3)
contour, elev

(4)
tvscl, rebin(elev,320,240)