MATLAB: How to save subplots in matlab app designer

app designerguidematlab guiplotplotting

Hi all
I am trying to save a subplot via app designer, but I have been unsuccessfull and I get this error : please check the attached file for the code
Error: Reference to a cleared variable app.
by the way this is how the image is created, it is supposed to be 6 subplots

Best Answer

I found that your app was created in R2017b. However, that release does not support subplots for uiaxes. This support was added from R2018b. Steven's answer here: https://www.mathworks.com/matlabcentral/answers/339320-is-subplot-supported-in-app-designer-r2017a-and-if-not-when-might-it-be-supported provide a workaround for R2017b by creating an invisible figure.