MATLAB: I have a simple plotting gui via user input using buttons and wish to save figure on the axes as an jpg image using a pushbutton. what do I need to write on the pushbutton callback

gui output as jpggui outputting as jpg

I have a simple plotting gui via user input using buttons and wish to save figure on the axes as an jpg image using a pushbutton. what do I need to write on the pushbutton callback?

Best Answer

...
fn='yourchosenfilename';
saveas(gcf,fn,'jpeg')
See
doc saveas % for more details
Related Question