MATLAB: How to color RED to the lower portion of the curve

plot

How to color RED to the lower portion of the curve y=x^2
x = 1 : 0.1 : 10;
y = x.^2;
plot(x,y)
axis([1 10 0 100])

Best Answer

Replace the
plot(x,y)
command with
area(x,y,'FaceColor',[1 0 0])