Fill up peak by colour

3 visualizzazioni (ultimi 30 giorni)
Namira
Namira il 29 Lug 2018
Commentato: madhan ravi il 29 Lug 2018
Hi,
I have a figure with multiple peaks.
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 Commenti
KALYAN ACHARJYA
KALYAN ACHARJYA il 29 Lug 2018
Do you have to fill only peaks? There are multiples peaks.
Namira
Namira il 29 Lug 2018
I want to fill all the peaks.

Accedi per commentare.

Risposta accettata

madhan ravi
madhan ravi il 29 Lug 2018
Modificato: madhan ravi il 29 Lug 2018
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.
REMARK: THE CYAN COLORED DOT IS THE PEAK IN THE ABOVE PICTURE.
  2 Commenti
Namira
Namira il 29 Lug 2018
Thanks. But I want to fill the peak, not peak point like attached image.
madhan ravi
madhan ravi il 29 Lug 2018
Try this area syntax.

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