Matlab: plotting frequency distribution with a curve

Posted by Kaly on Stack Overflow See other posts from Stack Overflow or by Kaly
Published on 2014-05-26T19:49:06Z Indexed on 2014/05/26 21:26 UTC
Read the original article Hit count: 104

Filed under:
|
|
|

I have to plot 10 frequency distributions on one graph. In order to keep things tidy, I would like to avoid making a histogram with bins and would prefer having lines that follow the contour of each histogram plot.

I tried the following

[counts, bins] = hist(data);
plot(bins, counts)

But this gives me a very inexact and jagged line.

I read about ksdensity, which gives me a nice curve, but it changes the scaling of my y-axis and I need to be able to read the frequencies from the y-axis.

Can you recommend anything else?

© Stack Overflow or respective owner

Related posts about matlab

Related posts about plot