How to display multiple plots with tab options

조회 수: 95 (최근 30일)
Dharmesh Joshi
Dharmesh Joshi 2022년 8월 31일
댓글: Dharmesh Joshi 2022년 8월 31일
Hi
I am displaying multiple Sub plot for a perticular sensor in a perticular figure.
I have about 8 sensors, therefore i am calling figure 8 times in a loop and each windoes display all corresponding plots.
It possible that i can have one windows with mulitple tabs, and each tab can have a figure with the subplots?

채택된 답변

Walter Roberson
Walter Roberson 2022년 8월 31일
First use @doc:uitabgroup() to contain a container panel .
Then for each section to be put in its own tab, call @doc:uitab() to create a panel.
Then use the panel handle as the parent for the axes() call
Example:
tg = uitabgroup(); %'Position' can be given in normalized units
t1 = uitab(tg);
ax1 = axes('Parent', t1);
plot(ax1, rand(1,20));
title(ax1, 'First tab');
t2 = uitab(tg);
ax2 = axes('Parent', t2);
plot(ax2, randn(1,20));
title(ax2, 'Second tab');
  댓글 수: 4
Walter Roberson
Walter Roberson 2022년 8월 31일
you can pass 'title' option on your uitab() call
Dharmesh Joshi
Dharmesh Joshi 2022년 8월 31일
Thanks I got working

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by