views:

107

answers:

1

Hello,

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!

+3  A: 

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')

JS Ng

related questions