I am using biwavelet package to conduct wavelet coherence analysis. When I want to set my own x ticklabel, I find axisis not working. The following gives a reproducible example. Thanks.
require(biwavelet)
t1 <- cbind(1:100, rnorm(100))
t2 <- cbind(1:100, rnorm(100))
wtc.t1t2 <- wtc(t1,t2,nrands = 10)
plot(wtc.t1t2, plot.cb = TRUE, plot.phase = TRUE,xaxt='n')
axis(1,at = seq(10,100,10),labels = seq(1,10,1))
The thing that was breaking your plot was
plot.cb = TRUE.In the source code for
plot.biwaveletthe author notes the following about theplot.cboption:So that was the problem -- you invoked
axis()afterplot.cband chaos ensued. However, you can manually add back the color bar usingimage.plotfrom thefieldspackage, after having runplotwithoutplot.cbthen having added youraxis().You can customize the ticks and the color bar to your liking this way!