Subplot position with App Designer
조회 수: 1 (최근 30일)
이전 댓글 표시
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
ZEINA AHDAB
2019년 7월 24일
편집: ZEINA AHDAB
2019년 7월 24일
Hi, I am having a similar problem. The 2 subplots created by default are not alined, and one is on top of the other in my case. I didn't want to creat two different plots and use more if loops to control their 'on' 'off' visibilities, which whoud add more processes to the app. I guess it's the only solution I have for now though.
But I believe that so far the information provided by mathworks isn't enough for the user to manage the subplot command. At least it wasnt for me.
I hope it will be made more userfriendly soon.
Shubham Gupta
2019년 7월 25일
@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 !
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!