How to save imshowpair figure?

3 views (last 30 days)
Yunruo Ni
Yunruo Ni on 23 Sep 2019
Answered: darova on 23 Sep 2019
I want to save the figure of imshowpair. How to do that? My code is like this. Which function I should use for saving these figure and where to put it?
Screen Shot 2019-09-23 at 12.54.04.png

Answers (2)

KALYAN ACHARJYA
KALYAN ACHARJYA on 23 Sep 2019
Edited: KALYAN ACHARJYA on 23 Sep 2019
fig=gcf
imwrite(fig,'image_result.tif'); % Change format as per requirements
This code save the current figure window in current working directory.

darova
darova on 23 Sep 2019
You can use saveas
saveas(gcf,'test.jpg', 'jpg')
% saveas(gcf,'test.fig', 'fig') % save as MATLAB figure
I use export_fig for saving images

Categories

Find more on Printing and Saving in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!