Opening a figure saved in .fig with several plots and working on them separately

조회 수: 3 (최근 30일)
EP
EP 2020년 6월 22일
답변: Tommy 2020년 6월 23일
Hi
I have figures saved in .fig with several images on them. I am trying to open them and draw cross sections with improfile on the same pixels for each image and then plot the cross sections. In other words, once we open a figure that contains several subplots with openfig, how can we work on each subplot separately? And treat the different plots (images in my case) as different objects.
Does anyone know how to do that?
The easy way would be to run my simulations again and save the images differently but that's a lot of files to save...

답변 (1개)

Tommy
Tommy 2020년 6월 23일
You could obtain handles to each of the axes within your figure and go from there:
fig = openfig('myfig.fig');
ax_handles = findall(fig, 'Type', 'Axes');
You can then access the image(s) contained within each axes, e.g.:
im1 = findall(ax_handles(1), 'Type', 'Image'); % image(s) within first set of axes

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by