How to add a trendline to a histogram plot and not show the histogram?

19 visualizaciones (últimos 30 días)
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?

Respuestas (1)

darova
darova el 25 de Feb. de 2020
Here is my solution
x = randi(100,1,100);
hist(x,20);
[y,x0] = hist(x,20);
hold on
plot(x0,y)
hold off

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by