'histfit': change line color

25 visualizzazioni (ultimi 30 giorni)
dd
dd il 13 Giu 2012
Hi, does anyone know how to change color and linestyle in 'histfit'? cheers

Risposta accettata

Tom Lane
Tom Lane il 13 Giu 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 Commenti
Oznur Mete
Oznur Mete il 4 Dic 2014
Thank you very much both histfit function and this tip are extremely useful!
Freddy Rubio Zambrano
Freddy Rubio Zambrano il 8 Lug 2022
thanks

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by