Re: [繪圖] histogram不同顏色已回收
※ 引述《FET (FET)》之銘言:
: 因為想要看多組資料分布
: 所以想要把每張histogram都疊在一起看
: 可是放到同一張圖上時
: hold on; 指令可以同時顯示在一張圖上
: 不過我想要每個資料都用不同顏色
: h = findobj(gca,'Type','patch');
: set(h,'FaceColor','r','EdgeColor','w')
: 不過這個語法好像會把所有histogram一起動到
: 請問有人知道要怎麼個別設?
: 就像plot可以個別設定顏色~
: 謝謝~
[n1,xout1]=hist(x1);
[n2,xout2]=hist(x2);
...
b1=bar(xout1,n1)
set(b1,'FaceColor','r','EdgeColor','w')
hold on
b2....
依此類推
--
" Physics is not the most important thing, love is. "
---by Richard P. Feynman---
--
※ 發信站 :批踢踢實業坊(ptt.cc)
◆ From: 128.42.228.250
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 3 篇):