Javid_p84
Javid_p84

Reputation: 868

Save plots as a picture in MATLAB

I'm trying to get some images from neural network function in matlab. One of the functions that I'm using is:

plotsomplanes(net)

I could not find anyway to automaticlly save the plot in a PNG file. Thanks in advance for any help or idea.

Upvotes: 0

Views: 188

Answers (1)

Nishant
Nishant

Reputation: 2619

Try this. It will save the figure in you current working directory. See the documentation of saveas here

close all;
figure('visible','off');
plotsomplanes(net);
saveas(gcf,'filename','format'); %// in this case format is png
close

Upvotes: 2

Related Questions