MERGING OF MULTIPLE GRAPHS INTO ONE

4 ビュー (過去 30 日間)
SULENDER SAHU
SULENDER SAHU 2022 年 3 月 2 日
回答済み: ag 2024 年 9 月 25 日
Is there any method to get a single graph from the above four graphs ? I have the data for individual graphs .
  1 件のコメント
Dyuman Joshi
Dyuman Joshi 2022 年 3 月 3 日
What do you mean by a single graph?

サインインしてコメントする。

回答 (1 件)

ag
ag 2024 年 9 月 25 日
Hi Sulender,
To plot multiple graphs on the same figure window, you can use the "hold on" command.
The below code snippet demonstrate how to achieve this using dummy data:
% Data for plotting
x = linspace(0, 2*pi, 100);
y1 = sin(x);
y2 = cos(x);
% First graph
figure; % Open a new figure window
plot(x, y1);
hold on
% Second graph
plot(x, y2);
xlabel('x');
legend('sin(x)', 'cos(x)');
title('Waves');
For more details, please refer to the following MathWorks documentation: Hold - https://www.mathworks.com/help/matlab/ref/hold.html
Hope this helps!

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by