How to put a histfit figure to UIAxes? (R2019a)

Hi. I meet difficulties in generating a histfit figure in uiaxes created in the Appdesigner, since the histfit function doesn't have the 'handle' input argument.
I tried the 'copyobj' function to copy the histfit figure to the uiaxes, as below. But the original figure is not easy to be deleted. And the method seems to be inconvenient.
Is there any simple way to do this, or should I plot the histogram and distribution fit step by step? Thank you for your time.
h = histfit(ndata(:,nn));
ax=app.UIAxes;
copyobj(h,ax);
delete(h)

 Akzeptierte Antwort

Dilip Kumar
Dilip Kumar am 30 Dez. 2021

0 Stimmen

It's very simple:
histfit(app.UIaxes, ndata(:,nn))

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2019a

Gefragt:

am 20 Okt. 2019

Beantwortet:

am 30 Dez. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by