'histfit': change line color

조회 수: 17 (최근 30일)
dd
dd 2012년 6월 13일
댓글: Freddy Rubio Zambrano 2022년 7월 8일
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!
Freddy Rubio Zambrano
Freddy Rubio Zambrano 2022년 7월 8일
thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by