MATLAB: How can the graph area be represented horizontally line in the sin(x) graph

line plot

x = 0: pi/100 : 2*pi; y = sin(x); plot(x,y); title('\bf\ity = sin\rm\bf(\itx\rm\bf)'); xlabel('\bf\itx'); ylabel('\bf\ity'); grid on;

Best Answer

area(x,y,'facecolor','r')