- Drag a panel component from the Component Library onto your canvas.
- Set the AutoResizeChildren property of the panel to 'off'.
- Specify the panel as the parent container using the 'Parent' name-value argument when you call subplot. Also, specify an output argument to store the axes.
- Call the plotting function with the axes as the first input argument.
Matlab App designer AXIS NOT SHOWING MULTIPLE IMAGES
1 回表示 (過去 30 日間)
古いコメントを表示
Muhammad Awais Ali
2022 年 2 月 15 日
回答済み: Benjamin Thompson
2022 年 2 月 15 日
Hi, normally we show multiple images using subplot, is there any way to use to display multiple images in one AXES in MATLAB APP DESIGNER.? Say if I want to run a loop and retrieve the images from selected folder, how to DISPLAY ALL IN ONE AXES. I am using MATLAB APP DESIGNER
0 件のコメント
採用された回答
Benjamin Thompson
2022 年 2 月 15 日
This section from the documentation article "Display Graphics in App Designer" may be helpful:
Use Functions That Don't Support Automatic Resizing
App Designer figures are resizable by default. This means that when you run an app and resize the figure window, components in the figure are automatically resized and repositioned to fit. However, some graphics functions do not support automatic resizing. To use these functions in App Designer, create a panel in which to display the output of the function and set the AutoResizeChildren property of the panel to 'off'. You can set this property in the Panel tab of the Component Browser or in your code.
For example, the subplot function does not support automatic resizing. To use this function in your app:
app.Panel.AutoResizeChildren = 'off';
ax1 = subplot(1,2,1,'Parent',app.Panel);
ax2 = subplot(1,2,2,'Parent',app.Panel);
plot(ax1,[1 2 3 4])
plot(ax2,[10 9 4 7])
Other commonly used functions that do not support automatic resizing include pareto and plotmatrix.
For more information about managing resize behavior, see Alternatives to Default Auto-Resize Behaviors.
Other possibilities could be to use imtile or montage to combine your images together into one image and have your App display that.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Specifying Target for Graphics Output についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!