Saturday 31 March 2012

Matlab multiple Plots on one Figure Window | Matlab multiple Plots on same Figure window

Here we see multiple Plots on same Figure window on Matlab. This type of graphs used for comparisons.You have put legend for each comparison. Its very simple to make it easy ,just use following syntax .Its very helpful to you.

>>figure;
>>plot(x1,y1);

>>hold on
>>drawnow
>>plot(x2,y2);

>>plot(x3,y3);

>> "

>> "

>> " ect..

example as follows
>> x1 = 1:5;
>> y1 = rand(1,5);

>> y2 = rand(1,5);

>> y3 = rand(1,5);

>> figure;plot(x1,y1);

>> hold on

>> drawnow

>> plot(x1,y2,'color','red');

>> plot(x1,y3,'color','green');

out put as follows. after plotting you have put the legend for each color plot comparison. ie( legend ('Blue','Red','Green')).



Related Search : Matlab multiple Plots on one Figure Window , Matlab multiple Plots Comparison  on same Figure window , Matlab multiple plot example code,multiple Plots one figure window example codes.

Kindly Bookmark and Share it:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...