How to superimpose a line plot to a colormap created with imagesc?

조회 수: 5 (최근 30일)
pietro
pietro 2015년 5월 23일
댓글: pietro 2015년 5월 24일
Hi all,
I need to write the lines necessary to get the following plot: http://s29.postimg.org/5ed1w5tfb/signalprova.jpg
In have a list of signals, namely from F1 to Fn. Then I computed the moving window correlation between signal F1 with signals F2 up to signal Fn. In above linked plot, the color map displays the moving window correlation and the line displayed is the temporal trend of the plot. I have plot the color map with imagesc . How may I superimpos the plot to the colormap and displaying the y-axis of the plot in the right side?
Thanks

채택된 답변

Walter Roberson
Walter Roberson 2015년 5월 23일
Have you considered using plotyy() ?
I do not see anything on there that needs to be done with imagesc(). It looks to me like the colored points could be done with scatter(). For example,
numsignal = 5;
corr_taken_at = [1 35 44 80 107]; %x locations the correlation was calculated
corr_values = rand(numsignal, length(corr_taken_at)); %correlation values
[Y, X] = ndgrid(1:numsignal, corr_taken_at);
pointsize = 10;
scatter(X(:), Y(:), pointsize, corr_values(:), 'filled');
This tells scatter() to use the corr_values as the information about which color to use

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by