Notice I have the visibility off, because I don't want the user to see this going in the background.

Note: You will have to change "UIAxes" to whatever you've named your UI figure

You could also add more properties, but you will have to go into your figure and find the object name to use.

I hope this helps.

Edit: I should also mention that to get this to work as function, I had to make it a call function in a separate .m file. I made a function SaveFigures(UIAxes, SaveName) that is called when ButtonSaveFigureButtonPushed. I have multiple possible plots, which is why I allow the UIAxes to vary. (I use a switch case to make sure I save the correct plot.)

Is there not a way to save what is in the axis directly from the UI? It appears to me that you are simply recreating the image in another figure. I have a plot with a background picture and data plotted over the top and would like to be able to save it without recreating it in a separate figure.
Thanks!

Then create a separate matlab function file (and call that matlab function from matlab ui). the function may include code to extract figure properties and save the figures as png file. The following link explains the saving all the figures and the code as well-- see the link--

Is there a solution for saving the axes plot in a .jpeg format or not yet? I am trying to insert what I got un an axes figure within a report automatically in app designer but I don't manage to do so.
Thanks.