How to use stackedplot on desired UIAxes at App Designer
42 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
mustafa can Kurt
el 29 de Sept. de 2021
Comentada: mustafa can Kurt
el 29 de Sept. de 2021
I want to use stackedplot at my app but I couldn't find a way to plot stackedplot at a specific UIAxes component.
stackedplot(app.A{7,1})
This is the syntax that I am currently using.
Thanks, Mustafa.
0 comentarios
Respuesta aceptada
Dave B
el 29 de Sept. de 2021
A stackedplot doesn't go in an axes, it's 'equivalent' to an axes in the sense that it goes in a figure or panel or tab. You could make a new stackedplot in your uifigure and set its position to the same as the uiaxes if your goal is to toggle between different types of plots, or use panels (or gridlayout) if your goal is to lay out your stackedplots.
3 comentarios
Dave B
el 29 de Sept. de 2021
You should be able to pass in the tab (app.Tab1) as the first argument to stackedplot. You'll still need to pass some data in as the stackedplot function requires it (you can use nan if you don't have any data yet), alternatively you could use the lower level matlab.graphics.chart.StackedLineChart('Parent',...) but that may be significantly more difficult.
Here's a demo with a programtically generated app:
u = uifigure;
tg = uitabgroup(u);
t1 = uitab(tg,'Title','Tab1');
t2 = uitab(tg,'Title','Tab2');
stackedplot(t1,rand(10,3))
stackedplot(t2,rand(10,4))
Más respuestas (0)
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!