I would like to plot multiple frequency histograms on one graph, however, my frequency plot is jagged and not pretty. As shown below with this code:
mmin = min([Data]);
mmax = max([Data]);
figure(1);n = hist(Data, x);
f = n/sum(n);
plot(x,f,'r','LineWidth',3)
To make it smooth, I looked into ksdensity
and created the graph below based on this code:
[f,xi] = ksdensity(data);
figure(1)
plot(xi,f);
However, I noticed that my graph is no longer plotting frequency on the y-axis. Is there anyway to correct for this change using ksdensity
? I really like how the graph looks as opposed to my frequency histogram and would like to keep using ksdensity
, unless there is a better suggestion.
Thank you!
Data Sample: https://www.dropbox.com/s/4ax2cuvugvqxjh6/splicing_attempt2_normalized_combined.txt?dl=0