Creating subplots in a for cycle with App Designer
23 views (last 30 days)
I’m trying to create subplots within a Panel with a for cycle in App Designer.
I was able to implement my first 3 subplots in a single panel in the following way:
I have defined my subplots at the beginning of the app in the following way:
properties (Access = public)
subplot1 matlab.ui.control.UIAxes % Description
subplot2 matlab.ui.control.UIAxes % Description
subplot3 matlab.ui.control.UIAxes % Description
Supposing that my matrix a to plot is actually is bigger than 3 columns and I want to plot, at any cycle, columns 1,2,3 and then 4,5,6 and then 7,8,9 etc etc..
How can I implement that in App Designer? If I write this:
figure(n3) %n3 is the index that moves the columns of a in a for cycle
I get this message: Unable to use a value of type matlab.ui.container.Panel as an index.
I would like that every set of 3 columns of the data are plotted as subplots in the same panel, maybe adding a sort of scrolling tab, is this possibile?
I hold Matlab R2022a. Thanks to everyone who will be able to help me.