Closed
Description
Using matplotlib>=2.2
cause a warning to be issued when using the analysis
program.
/home/lercole/.virtualenvs/thermotest2/local/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:107: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
warnings.warn(message, mplDeprecation, stacklevel=1)
or
/home/lercole/.virtualenvs/thermotest3/lib/python3.6/site-packages/matplotlib/figure.py:98: MatplotlibDeprecationWarning:
Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
"Adding an axes using the same arguments as a previous axes "
For matplotlib>=3.1
it becomes:
/home/lercole/.virtualenvs/thermotest3/lib/python3.6/site-packages/thermocepstrum/analysis.py:666: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
plt.axes().xaxis.set_major_locator(MultipleLocator(dx1))
/home/lercole/.virtualenvs/thermotest3/lib/python3.6/site-packages/thermocepstrum/analysis.py:667: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
plt.axes().xaxis.set_minor_locator(MultipleLocator(dx2))
/home/lercole/.virtualenvs/thermotest3/lib/python3.6/site-packages/thermocepstrum/analysis.py:668: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
plt.axes().yaxis.set_major_locator(MultipleLocator(dy1))
/home/lercole/.virtualenvs/thermotest3/lib/python3.6/site-packages/thermocepstrum/analysis.py:669: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
The problem seems to refer to these lines:
https://github.com/lorisercole/thermocepstrum/blob/4e89421c45d3eb95d445f1ed5d7f2e5e25532f22/thermocepstrum/analysis.py#L671-L674