- Ensure that the required indices correspond to the right day in your data
- Kindly verify your function implementation. I can see that you have used xlim[32 4096]. The correct way of implementing xlim is to enclose the indices within paranthesis. Refer to this for more help.
how to adjust Axis limit for wavelet transform plot?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
HI, I have used a daily time series of nine years and detrended it to get wavelet transform. I am trying to limit my wavelet transform from 32 to 4096 (days) period.
I used xlim[32 4096], and also used exact value from the output array(period) from function "wt".
Both way the plot gets blanked. I understand that the plot is going out of the frame and thatswhy I am not getting error in command window too.
Please let me know if there is any way to do adjust axes in such case. Thank you!
3 commentaires
Nivedita
le 5 Sep 2023
Hi Dolly,
Can you provide the dataset that you are working on? It is quite difficult to figure out what exactly is causing the figure to not fit in the axes and why the "yticks" is behaving in a weird manner.
Réponses (1)
Vitek Stepien
le 5 Sep 2023
Hi Dolly,
I had the same problem, in my case it turned out that when using wcoherence without output arguments to plot it automatically, my y-values were very weird and I had to convert them to my actual values.
One solution would be to use wcoherence with output arguments and plot it manually, but you loose the phase arrows, so that's not an option if you care about that.
The other solution is to figure out the conversion, as I mentioned above. Try the following commands, right after your wcoherence line:
ax = gca;
figure, plot(ax.YTick)
This will show you the relationship between YTick values. If the values are very low, then perhaps they are log of your actual values. If so, try the following, with Fs being your frequency band (inverse of time step).
ytick_mod = Fs*round(pow2(ax.YTick));
ax.YTickLabel = ytick_mod;
You should be able to figure out the rest, because it depends on your actual data and what you want to do with the labeling. Let me know if it helped!
0 commentaires
Voir également
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!