How do you keep the graphs in a constant location in Matlab App Designer?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have been trying to plot a couple of graphs on App Designer so that they can line up. However, whenever once the data is loaded the graphs shift slightly and the graphs do not stay where I orgnailly put them in the Design view. I have also tried to hard code the positions of the graphs, but it has not worked.
Here is the code I am using to fix the points of the graphs.
Length = 1335;
height = 150;
start = 15;
app.O2_Graph.Position = [start, 240, Length, height+100];
app.Salinity_Graph.Position = [start, 490, Length, height];
app.Temp_Graph.Position = [start, 630, Length, height];
2 comentarios
dpb
el 5 de Mzo. de 2025
Probably the issue is that when the data are placed on the axes, varying amounts of spacing are needed for labels, etc., depending upon the precision.
Attaching sample data would be helpful...
Respuesta aceptada
Voss
el 5 de Mzo. de 2025
You can try specifying each (ui)axes InnerPosition, which excludes space for labels, tick labels, etc., rather than Position, adjusting the values appropriately, and/or setting each (ui)axes PositionConstraint to 'innerposition', which holds InnerPosition constant when the labels, etc., are updated.
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre 2-D and 3-D 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!