Lots of overlap in your data. This code will do it; I set the rectangles to unfilled to show the overlap.
dt = data table("Rectangles");
// Set some constants
xmin = 0;
xmax = 4000;
ymin = 0;
ymax = 1500;
xres = 800;
yres = 500;
color_list = {"Red", "Blue", "Green", "Orange", "Purple"};
filled_rect = 0; // set to 1 for filled rectangles
heat_map_win = New Window( "Example Rectangles ",
rect_gb = Graph Box(
framesize( xres, yres ),
xscale(xmin, xmax),
yscale(ymin, ymax),
for (i = 1, i <= nrows(dt), i++,
xleft = dt:x 1[i];
xright = dt:x 3[i];
ybottom = dt:y 1[i];
ytop = dt:y 4[i];
pcolor = color_list[dt:material[i]];
pen color(pcolor);
fill color(pcolor);
rect(xleft, ytop, xright, ybottom, filled_rect);
),
)
);