How to add a trendline to a histogram plot and not show the histogram?
14 次查看(过去 30 天)
显示 更早的评论
I need to add a trendline to the histogram and becuase I have several datasets I want to remove the histogram and keep only trendlines.
Any idea?
0 个评论
回答(1 个)
darova
2020-2-25
Here is my solution
x = randi(100,1,100);
hist(x,20);
[y,x0] = hist(x,20);
hold on
plot(x0,y)
hold off
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!