Publishing multiple graphs without using a subplot function

조회 수: 10 (최근 30일)
Jookwang Lee
Jookwang Lee 2015년 2월 16일
답변: ag 2024년 9월 25일
How do you publish multiple graphs independently without putting all of them in a subplot?

답변 (1개)

ag
ag 2024년 9월 25일
Hi Jookwang,
To publish multiple graphs independently in MATLAB without using subplots, you can create separate figure windows for each graph. This approach allows you to display each graph in its own window.
The below code snippet demonstrates how to achieve that:
% 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);
title('Sine Wave');
xlabel('x');
ylabel('sin(x)');
% Second graph
figure; % Open another new figure window
plot(x, y2);
title('Cosine Wave');
xlabel('x');
ylabel('cos(x)');
Hope this helps!

카테고리

Help CenterFile Exchange에서 Networks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by