Is there a way of saving a figure plot without actually plotting it? I mean, let\'s say I want to save the graph for plot(1:10, (1:10).^2), can I save it without sh
plot(1:10, (1:10).^2)
There is also the saveas(h,'filename.ext') function which can save a figure in some formats.
saveas(h,'filename.ext')
This can be done:
set(gcf,'Visible','off'); plot((1:10),(1:10).^2); print -dpng c:\chris.png % or whatever your print command is