duducosmos / PIWavelet

Python Interface for Wavelet Analises
23 stars 7 forks source link

The optional parameter 'labels' is not useful in Wavelet Cross Power Spectrum Analysis #2

Open SHEN-Cheng opened 4 years ago

SHEN-Cheng commented 4 years ago

Dear author: I was testing your function CWT,So i have tried to define the colorbar by myself , i set myXSpec = piwavelet.wcross(y1,y2) myXSpec.plot(t = x, title='Test',units='sec', labels=['1/32','1/16','1/8', '1/4', '1/2', '1', '2']) the default code is myXSpec.plot(t = x, title='Test',units='sec') But there is nothing change in picture. Regards Shen Snipaste_2020-03-24_23-52-22

duducosmos commented 4 years ago

Thanks, I will verify.

Em ter, 24 de mar de 2020 12:55, shen159876 notifications@github.com escreveu:

Dear author: I was testing your function CWT,So i have tried to define the colorbar by myself , i set myXSpec = piwavelet.wcross(y1,y2) myXSpec.plot(t = x, title='Test',units='sec', labels=['1/32','1/16','1/8', '1/4', '1/2', '1', '2']) the default code is myXSpec.plot(t = x, title='Test',units='sec') But there is nothing change in picture. Regards Shen [image: Snipaste_2020-03-24_23-52-22] https://user-images.githubusercontent.com/40594953/77447340-8bb81400-6e2a-11ea-9c18-a58a8a63b71b.jpg

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/duducosmos/PIWavelet/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEPTHBFCHOBASRT5BHGD6TRJDJVTANCNFSM4LSYR7QQ .

SHEN-Cheng commented 4 years ago

Thanks, I will verify. Em ter, 24 de mar de 2020 12:55, shen159876 notifications@github.com escreveu: Dear author: I was testing your function CWT,So i have tried to define the colorbar by myself , i set myXSpec = piwavelet.wcross(y1,y2) myXSpec.plot(t = x, title='Test',units='sec', labels=['1/32','1/16','1/8', '1/4', '1/2', '1', '2']) the default code is myXSpec.plot(t = x, title='Test',units='sec') But there is nothing change in picture. Regards Shen [image: Snipaste_2020-03-24_23-52-22] https://user-images.githubusercontent.com/40594953/77447340-8bb81400-6e2a-11ea-9c18-a58a8a63b71b.jpg — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#2>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEPTHBFCHOBASRT5BHGD6TRJDJVTANCNFSM4LSYR7QQ .

I tried the plot optional nameSave to save picture, but i got the error.

/mnt/d/ubuntu/conda/envs/py/lib/python3.7/site-packages/piwavelet/piwavelet.py in plot(self, t, title, units, **kwargs)
   1370                     scale : (boolean) True  for not log2 scale of the Plot
   1371         """
-> 1372         self.__plotXWC(self.xwt, t, self.coi, self.freqs, self.signif, title, units,**kwargs)
   1373 
   1374     def __plotXWC(self,  xwt, t, coi, freqs, signif, title, units='days',**kwargs):

/mnt/d/ubuntu/conda/envs/py/lib/python3.7/site-packages/piwavelet/piwavelet.py in __plotXWC(self, xwt, t, coi, freqs, signif, title, units, **kwargs)
   1567         pylab.draw()
   1568 
-> 1569         if(nameSave):
   1570             pylab.savefig(nameSave)
   1571         else:

UnboundLocalError: local variable 'nameSave' referenced before assignment