adjust values on x-axis wcoherence

3 vues (au cours des 30 derniers jours)
CG
CG le 19 Août 2024
Modifié(e) : praguna manvi le 20 Août 2024
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')

Réponses (1)

praguna manvi
praguna manvi le 19 Août 2024
Modifié(e) : praguna manvi le 20 Août 2024
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:

Catégories

En savoir plus sur Continuous Wavelet Transforms dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by