Fill up peak by colour
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I have a figure with multiple peaks.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/192768/image.png)
I want to fill up every peak by colors. I don't know the command to fill up by color. I found stem command in Matlab, but it doesn't fill with color. Any suggestion from anyone?
Thanks.
댓글 수: 2
채택된 답변
madhan ravi
2018년 7월 29일
편집: madhan ravi
2018년 7월 29일
Hi, try this EXAMPLE:
[PKS,LOCS]=findpeaks(y,TIME)
% TIME - x-axis
%y - y-axis
plot(LOCS,PKS,'ok',...
'MarkerEdgeColor','k',...
'MarkerFaceColor','c',...
'MarkerSize',10)
hold on
NOTE: YOU CAN ADJUST MARKERSIZE ACCORDING TO YOUR WISH.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/192744/image.png)
REMARK: THE CYAN COLORED DOT IS THE PEAK IN THE ABOVE PICTURE.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!