I would fill it with a patch object.
line([1 1],[0 100],'color','b','linewidth',3);
hold all
verts = [[0;1;1;0],[0;0;100;100]];
faces = [1 2 3 4];
cdata = [1 0 0];
p = patch('Faces',faces,'Vertices',verts,'FaceColor','flat',...
'FaceVertexCData',cdata,'edgecolor','none');
axis([0 2 0 100])
In the same way, you can make patch out of polygons by specifying the values in the verts array. Column 1 is the x-coord and column two is the y-coord of the vertices of the polygon.
Best Answer