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 Kommentare

Mehmed Saad
Mehmed Saad am 6 Jul. 2020
Yaren Sever
Yaren Sever am 6 Jul. 2020
yes
Mehmed Saad
Mehmed Saad am 6 Jul. 2020
do you need all the figure features on UIAXES or just an image?
Yaren Sever
Yaren Sever am 6 Jul. 2020
just an image
Yaren Sever
Yaren Sever am 6 Jul. 2020
yes

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Walter Roberson
Walter Roberson am 6 Jul. 2020

1 Stimme

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 am 6 Jul. 2020

0 Stimmen

a = uiaxes;
b = getframe(gca);
imshow(b.cdata,'Parent',b)
There might be some quality issues

Kategorien

Mehr zu Climate Science and Analysis finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 6 Jul. 2020

Beantwortet:

am 6 Jul. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by