To create 10 SubPlots generated during for loop with different colours

2 visualizaciones (últimos 30 días)
I have written following code to make 10 line graphs in same plot.
How can I modify this to make individual 10 subplots within same plot screen without overlapping each other ?
What is the trick behind diving the screen into equal parts (eg: 10 here) ?
%%%%%%% CODE STARTS HERE %%%%%%%
pre_list = dir('*.mat');
file_list = {pre_list.name}';
C = {'c'; 'm'; 'y'; 'k'; 'r'; 'g'; 'b'; [.5 .6 .7];[.8 .2 .6];[.1 .2 .3]};
% C = 10 loops for ten plots with different colours %
for i = 1:size(file_list,1)
load(file_list{i,1})
variable_wise = cell(zeros); a = 1;
for j = 1:size(integrated_data,1)
if strcmp (integrated_data{j,3},'Ln Kf-m - Ln Kf-w')
variable_wise(a,1) = integrated_data(j,2);
variable_wise(a,2) = integrated_data(j,5);
a = a+1;
end
end
a = cell2mat(variable_wise(:,2));
plot(a,'color',C{i,1},'LineWidth',2);
hold on
end

Respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by