I came across this program for exporting a figure. I just want to ask, what should I pass to the program if I want to export a figure of mine to some image (i.e; .jpg), as I couldn't figure out what to pass as a parameter.
Thanks.
I came across this program for exporting a figure. I just want to ask, what should I pass to the program if I want to export a figure of mine to some image (i.e; .jpg), as I couldn't figure out what to pass as a parameter.
Thanks.
On
patrik's suggestion probably refers to this ME file. (Which is great, by the way)
A native MATLAB solution would be
saveas(<handle of the figure>,<file path with .jpg at the end>)
This is what I have used for a long time and it works (e.g., saveas(h,'/figures/automatic/myfig.jpg')); but it is very possible that print or something else is better suited for whatever reason.
The built-in command
printis used to export a figure to an image. Like so: