Plot of histogram and probability distribution function.
Ältere Kommentare anzeigen
I have three columns of data. I am plotting histogram and normal distribution probability density function (pdf) for each column. For one column, I get its histogram and pdf shown by two different colours in plot and I get two indicators in legend. Similarly, I get histogram and pdf for remaining two columns of data. In total, I get 6 indicators with 6 different colors in legend. I want to get histogram and pdf of one column of data with same colour and show indicator only for histogram. Similarly, I want to get histogram and pdf for remaining two columns so that I get three colours for three columns of data.
Thankyou
x = (1:1:100)';
y = (101:1:200)';
z = (201:1:300)';
p1 = fitdist(x,'Normal');
p2 = fitdist(y,'Normal');
p3 = fitdist(z,'Normal');
plot(p1)
hold on
plot(p2)
plot(p3)
legend('5%','5%','10%','10%','15%','15%');
hold off
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Legend finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
