How can I copy figure to UIAxes?

조회 수: 19 (최근 30일)
Yaren Sever
Yaren Sever 2020년 7월 6일
답변: Walter Roberson 2020년 7월 6일
I created figure which includes gramm graphs. I want to copy this figure to UIAxes component. I tried copyObj but I couldn't solve it.
  댓글 수: 6
Yaren Sever
Yaren Sever 2020년 7월 6일
yes

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2020년 7월 6일
Use imhandles() on the figure that is showing the gramm object.
You can now copyobj() the resulting handle(s) to a uiaxes that is part of a uifigure. You can also, if appropriate, set the Parent property of the image handles to be the uiaxes.
ufig = uifigure();
uax = axes('Parent', ufig);
tfig = figure();
tax = axes('Parent', tfig);
image('Parent', tax); %there is a default image.
imh = imhandles(tfig); %pretending we do not have the image handle easily available
imh.Parent = uax; %move the image from the traditional axes to the uiaxes.

Mehmed Saad
Mehmed Saad 2020년 7월 6일
a = uiaxes;
b = getframe(gca);
imshow(b.cdata,'Parent',b)
There might be some quality issues

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by