'histfit': change line color

25 visualizaciones (últimos 30 días)
dd
dd el 13 de Jun. de 2012
Comentada: Freddy Rubio Zambrano el 8 de Jul. de 2022
Hi, does anyone know how to change color and linestyle in 'histfit'? cheers

Respuesta aceptada

Tom Lane
Tom Lane el 13 de Jun. de 2012
h = histfit(randn(100,1));
set(h(1),'facecolor','g'); set(h(2),'color','m')
Changing other properties is similar. Just remember h(1) is a patch and h(2) is a line.
  2 comentarios
Oznur Mete
Oznur Mete el 4 de Dic. de 2014
Thank you very much both histfit function and this tip are extremely useful!
Freddy Rubio Zambrano
Freddy Rubio Zambrano el 8 de Jul. de 2022
thanks

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by