How to display multiple plots with tab options

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?

 Accepted Answer

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 Comments

I have for loop which does some process for each sensors data.
Can t1,t2 be simply declared like?
t(k) = uitab(tg);
I got it working in principles.
But how do i name the tabs?
you can pass 'title' option on your uitab() call

Sign in to comment.

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Products

Release

R2022a

Tags

Community Treasure Hunt

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

Start Hunting!