How do I plot two distributions on top of each other?
19 ビュー (過去 30 日間)
古いコメントを表示
I fit this histogram with the distribution fitter app. This fit is called the "t position scale" in practice. On top of this histogram, I want to plot a distribution with a mean of 0 and a variance of 1. I would be very grateful if you could help me figure out how to do this.
0 件のコメント
回答 (2 件)
Arthur Morais
2021 年 10 月 2 日
You can write the plot command with the two variables that you have.
plot(data,density,data,distribution)
You can change the type of line adding markers.
plot(data,density,'b--',data,distribution,'k:')
If you don't use any markars, matlab chages only the color the of line.
Star Strider
2021 年 10 月 2 日
6 件のコメント
Star Strider
2021 年 10 月 4 日
My pleasure!
To plot the requested distribution,. it will be necessary to use the first curve. The data and fitted distribution will then essentially be a thin vertical red line, however there is no way to avoid that if the objective is to plot both in a single axes object.
.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!