How to display multiple plots with tab options
35 views (last 30 days)
Dharmesh Joshi on 31 Aug 2022
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 on 31 Aug 2022
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
tg = uitabgroup(); %'Position' can be given in normalized units
t1 = uitab(tg);
ax1 = axes('Parent', t1);
title(ax1, 'First tab');
t2 = uitab(tg);
ax2 = axes('Parent', t2);
title(ax2, 'Second tab');