adjust values on x-axis wcoherence

조회 수: 3 (최근 30일)
CG
CG 2024년 8월 19일
편집: praguna manvi 2024년 8월 20일
I have plotted wavelet coherence for my dataset and have got the following plot. However my time series spans 600 years - 1000 years, yet this is being plotted from 0 - 400 years in the plot. Is there a way I can get the x-axis to be automatically plotted over the correct time period? I need phase arrows so I dont want to plot this manually.
Ts = 0.74;
ti = [mint2:Ts:maxt1]';
data_1_interp = interp1(timeseries1(:,1),timeseries1(:,2),ti);
data_2_interp = interp1(timeseries2(:,1),timeseries2(:,2),ti);
wcoherence(data_1,data_2,years(Ts),'phasedisplaythreshold',0.75)
colormap(turbo)
xline([800 1200],'white','Linewidth',4)
xlabel('Time')
ylabel('Period')

답변 (1개)

praguna manvi
praguna manvi 2024년 8월 19일
편집: praguna manvi 2024년 8월 20일
Hi @CG,
To visualize the timespan of 800-1000 years on the x-axis in the "wcoherence" plot, you can adjust the sampling interval "Ts." The sampling interval "Ts" specifies the duration between two consecutive points in the data. In this case, it is set to "0.74 years." Consequently, the timespan on the x-axis will scale to "length(data) × 0.74," which might result in a 0-400 range on the x-axis in the visualization.
For more details on how "Ts" affects the plot, you can refer to the MathWorks documentation provided here:

카테고리

Help CenterFile Exchange에서 Continuous Wavelet Transforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by