MATLAB: Shall I plot some figure to save without show

barplot

I want to plot some figures by functions 'bar' and 'plot', but I don't want this figure being shown and just want to save it on somewhere; shall I?

Best Answer

figure('Visible','off')
plot(rand(1,100))
saveas(gcf,'myfigure.fig','fig') % give extension you want
Related Question