Borrar filtros
Borrar filtros

changing scale of x-axis in histfit

6 visualizaciones (últimos 30 días)
María Jesús
María Jesús el 29 de Mzo. de 2015
Comentada: Star Strider el 29 de Mzo. de 2015
Hi!
I am generating some histograms with a normal distribution using histfit, and I need to change the scale in the x-axis. Specifically, I get 3 histograms for three different possible outcomes, and I need the scale on all of them to be the same in the x-axis.
Thanks!
  1 comentario
María Jesús
María Jesús el 29 de Mzo. de 2015
More simply, I just want to choose the scale in the x-axis for a histogram generated using histfit

Iniciar sesión para comentar.

Respuesta aceptada

Star Strider
Star Strider el 29 de Mzo. de 2015
I am not certain what you’re doing, but I would consider using the hold function.
For example:
D1 = randn(1,100); % Create Data For Distributions
D2 = 2+1.5*randn(1,100);
D3 = 3+0.5*randn(1,100);
figure(1) % Plot All ‘histift’s On The Same Axes
histfit(D1)
hold on
histfit(D2)
histfit(D3)
hold off
grid
Is this what you want to do?
  4 comentarios
María Jesús
María Jesús el 29 de Mzo. de 2015
yes, thank you!!
Star Strider
Star Strider el 29 de Mzo. de 2015
My pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

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