regeirk / pycwt

A Python module for continuous wavelet spectral analysis. It includes a collection of routines for wavelet transform and statistical analysis via FFT algorithm. In addition, the module also includes cross-wavelet transforms, wavelet coherence tests and sample scripts.
http://regeirk.github.io/pycwt/
Other
293 stars 104 forks source link

Conflict with matplotlib 1.4.3 #10

Closed fragkoul closed 8 years ago

fragkoul commented 8 years ago

I tried to run sample.py and I got the following error:

.../site-packages/matplotlib/init.py:855: UserWarning: text.fontsize is deprecated and replaced with font.size; please use the latter.

I assume there is a conflict with the newer versions of matplotlib. Can there be an easy fix?

Here is a similar issue: https://github.com/mrtommyb/K2fov/issues/3

nabobalis commented 8 years ago

It isn't quite a conflict.

You need to change:

params = {'text.fontsize': fontsize,
          'xtick.labelsize': fontsize,
          'ytick.labelsize': fontsize,
          'axes.titlesize': fontsize,
          'text.usetex': True
         }

to

params = {'font.size': fontsize,
          'xtick.labelsize': fontsize,
          'ytick.labelsize': fontsize,
          'axes.titlesize': fontsize,
          'text.usetex': True
         }
fragkoul commented 8 years ago

Thank you @nabobalis ! After this correction I also had to turn fontsize = 'medium' to e.g. fontsize = 14 because of the error below:

.../site-packages/matplotlib/init.py:895: UserWarning: Trying to set 'font.size' to 'medium' via the update method of RcParams which does not validate cleanly. This warning will turn into an Exception in 1.5. If you think 'medium' should validate correctly for rcParams['font.size'] please create an issue on github. func='update'))

nabobalis commented 8 years ago

Yeah, the sample.py needs an update.