Displaying three set of plots in one figure

Hello, I need help modifying the script i have to display three sets of plots from three individual data files in 1 figure. Xlabel and Ylabel are the same for all three plots. My goal is to make a comparison between the three data files plots (Represented by different line colors for each file plot).

 Accepted Answer

%look at this example
x=0:0.1:10;
y1=sin(x);
y2=cos(x);
y3=2*abs(cos(x));
plot(x,y1,'r',x,y2,'g',x,y3,'b')
%Then add whatever you want
legend({'y1','y2','y3'})
xlabel('x');
ylabel('y')

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Asked:

on 17 Jan 2014

Edited:

on 18 Jan 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!