'histfit': change line color

25 次查看(过去 30 天)
Hi, does anyone know how to change color and linestyle in 'histfit'? cheers

采纳的回答

Tom Lane
Tom Lane 2012-6-13
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 个评论
Oznur Mete
Oznur Mete 2014-12-4
Thank you very much both histfit function and this tip are extremely useful!

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by