Add multiple hist fit to a figure, without the hist
11,024
h = histfit(...)
returns a vector of handles h, where h(1) is the handle to the histogram and h(2) is the handle to the fitted curve.
use delete(h(1))
to delete the histogram.
If you didn't assign a handle to the fitted histo, you can retrieve it using h = get(gca,'Children')
Related videos on Youtube
Author by
Admin
Updated on April 20, 2022Comments
-
Admin about 2 years
I'm a matlab newbie, and i'd like to superpose some hist fit on a same figure. I know the function histfit, but unfortunatly i can't get to remove the hist and only keep the curve. I guess once i'll know how to do that i'll be able to add several curves using "hold on".
Thanx for any answers or advices!
-
Amro about 14 yearsyou might also find KSDENSITY useful: mathworks.com/access/helpdesk/help/toolbox/stats/ksdensity.html
-
-
Franck Dernoncourt almost 11 yearsWith R2012a, I use
delete(h(2))
to delete the histogram.