stacked figure from text file
1 view (last 30 days)
Show older comments
I have a text file with 3 column of data
A = load(FileName);
figure;
plot (A(:,1),A(:,2), 'LineWidth',1, 'Color', [0 0.4470 0.7410])
plot (A(:,1),A(:,3), 'LineWidth',1, 'Color', [0.6350 0.0780 0.1840])
This will plot them in one figure
How can I plot them in two stacked figures?
0 Comments
Accepted Answer
Arif Hoq
on 28 Dec 2022
Edited: Arif Hoq
on 28 Dec 2022
A=horzcat((1:10)',randi(20,10,1),randi(100,10,1));
figure(4);
plot (A(:,1),A(:,2),'-o', 'LineWidth',1, 'Color', [0 0.4470 0.7410])
plot (A(:,1),A(:,3),'-*', 'LineWidth',1, 'Color', [0.6350 0.0780 0.1840])
with "hold on" command
A=horzcat((1:10)',randi(20,10,1),randi(100,10,1));
figure(6);
plot (A(:,1),A(:,2),'-o', 'LineWidth',1, 'Color', [0 0.4470 0.7410])
hold on
plot (A(:,1),A(:,3),'-*', 'LineWidth',1, 'Color', [0.6350 0.0780 0.1840])
figure(8);
subplot(2,1,1)
plot (A(:,1),A(:,2), 'LineWidth',1, 'Color', [0 0.4470 0.7410])
subplot(2,1,2)
plot (A(:,1),A(:,3), 'LineWidth',1, 'Color', [0.6350 0.0780 0.1840])
0 Comments
More Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!