%% Create Area Chart with Transparency
% Combine two semitransparent area charts by setting the |FaceAlpha| and
% |EdgeAlpha| properties for each area object.

% Copyright 2015 The MathWorks, Inc.


x = linspace(0,10);
y1 = 4 + sin(x).*exp(0.1*x);
area(x,y1,'FaceColor','b','FaceAlpha',.3,'EdgeAlpha',.3)

y2 = 4 + cos(x).*exp(0.1*x);
hold on
area(x,y2,'FaceColor','r','FaceAlpha',.3,'EdgeAlpha',.3)
hold off