Distinguish the different curves and identify the points corresponding to each way
古いコメントを表示

I have this figure but it is difficult to distinguish the different curves and identify the points corresponding to each approach. Is there any other way to represent each method?
Thanks in advance
2 件のコメント
rana
2025 年 2 月 14 日
採用された回答
その他の回答 (1 件)
Hi @rana
I now understand that you are seeking advice on graphically displaying the data. Here is an example of what I consider to be good and bad figures.
y1 = randi([60, 80], 1, 100);
y2 = randi([10, 50], 1, 100);
y3 = randi([15, 55], 1, 100);
y4 = randi([30, 70], 1, 100);
y5 = randi([35, 75], 1, 100);
x = linspace(1, 100);
figure(1)
plot(x, y1, 'r'), hold on
plot(x, y2, 'g'), plot(x, y3, 'b'), plot(x, y4, 'm'), plot(x, y5, 'c'), hold off
title('BAD: Chartjunk')
figure(2)
tL = tiledlayout(5, 1, 'TileSpacing', 'Compact');
nexttile
plot(x, y1, 'r', 'linewidth', 2.5), hold on
plot(x, y2, 'g'), plot(x, y3, 'b'), plot(x, y4, 'm'), plot(x, y5, 'c'), hold off, ylabel('Method 1')
nexttile
plot(x, y2, 'g', 'linewidth', 2.5), hold on
plot(x, y1, 'r'), plot(x, y3, 'b'), plot(x, y4, 'm'), plot(x, y5, 'c'), hold off, ylabel('Method 2')
nexttile
plot(x, y3, 'b', 'linewidth', 2.5), hold on
plot(x, y1, 'r'), plot(x, y2, 'g'), plot(x, y4, 'm'), plot(x, y5, 'c'), hold off, ylabel('Method 3')
nexttile
plot(x, y4, 'm', 'linewidth', 2.5), hold on
plot(x, y1, 'r'), plot(x, y2, 'g'), plot(x, y3, 'b'), plot(x, y5, 'c'), hold off, ylabel('Method 4')
nexttile
plot(x, y5, 'c', 'linewidth', 2.5), hold on
plot(x, y1, 'r'), plot(x, y2, 'g'), plot(x, y3, 'b'), plot(x, y4, 'm'), hold off, ylabel('Method 5')
title(tL, 'BETTER: Split into 5 plots')
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


