Subplot position with App Designer

4 views (last 30 days)
Marc Youcef
Marc Youcef on 5 Jun 2019
Commented: Shubham Gupta on 25 Jul 2019
I am using App Designer on MATLAB R2019a and would like to use a subplot to show different images side to side
I read a document here that explains how to set subplots with new version of MATLAB App Designer but the issue I face is regarding the positioning of such subplot.
I have an App with a panel called MyPanel where I want the subplot to appear. According the link above I do :
app.MyPanel.AutoResizeChildren = 'off';
CellAxes{1,1}=subplot(1,2,1,'Parent',app.MyPanel);
This create axes randomly set on MyPanel. Then when I want to change the position of my subplot though 'Position' variable, it changes only position of subplot(1,2,1). Next subplot will not be aligned with the previously set position for subplot(1,2,1).
What I am looking to is to set the first size and position of the subplot and then the next subplot(1,2,2) would align and be beside that previous plot.
In other words, when we call subplot, it creates axes by defaults in a certain position in the figure on which it will align coming subplots. I want to change that initial positiont value and let the subplot continue to do its magic on aligning the next subplots.
Hope it clear enough.
  5 Comments
Shubham Gupta
Shubham Gupta on 25 Jul 2019
@ZEINA AHDAB, can you please share your code with us, so we can understand why exactly your default subplots are not aligned because as far as I know, I haven't seen default subplots behaving like that?
Waiting to hear from you soon !

Sign in to comment.

Answers (0)

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by