N=10 //Generate (useless) data x=0:1:10; // size: 1*11 y=0:1:20; // size: 1*21 z=ceil(N*rand(11,21)); //size: 11*21 //Plot scf(); //Create a new grahic window xset("colormap",graycolormap(N)); // Choose colormap (see the help of colormap) xtitle("Data", "x coordinate", "y coordinate"); colorbar(min(z), max(z)); // Draw a colorbar grayplot(x, y, z); // Actually plot them