Plot a line over spectrogram
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Pegah Hosseini
le 18 Juil 2013
Commenté : Pegah Hosseini
le 6 Jan 2014
I use the following code to plot a line over my spectrogram so that I show the onset time. But it sometimes plots the line over the spectrogram and sometimes the spectrogram over the line (the line is there from y=0 to y=10 then not there from y=10 to y=20 and then again it is there from y=20 to y=30). Any suggestions?
figure surf(x,y,z,'edgecolor','none'); axis tight; view(0,90); colorbar set(gca,'fontsize',14) hold on h=line([0 0],[y(1) y(end)],'color','m','Linestyle','-','LineWidth',2); uistack(h,'top')
I also tried:
h=get(gca,'Children'); set(gca,'Children',h(end:-1:1))
or
set(gca,'Children',h(1:end))
but no luck. All tries give exactly the same result.
0 commentaires
Réponse acceptée
Jeremy
le 6 Jan 2014
I've done this before, I believe the trick is to set the Z-value for your line so that is always above the spectrogram.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Time-Frequency Analysis dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!