Running matrixprofile.analyze() causes AttributeError: 'NoneType' object has no attribute 'get_subplotspec' when matplotlib version 3.5.0 is installed. All plots seem to be shown correctly, but due to the exception, the function never returns. Upgrading to matplotlib 3.5.1 resolves the issue.
The matrixprofile package lists matplotlib>=3.0.3 in requirements.txt. I haven't tested any other versions for this issue, but it might be worth adding matplotlib!=3.5.0 to the package requirements if this is a matplotlib bug and can't be fixed in matrixprofile itself.
import numpy as np
import matrixprofile as mp
np.random.seed(1)
vals = np.random.randn(500)
profile, figures = mp.analyze(vals)
It should throw an AttributeError. Then, restart the kernel, upgrade matplotlib with pip install matplotlib==3.5.1, and rerun the cell (it should run successfully).
Expected behaviormatrixprofile.analyze() returns without any errors on both matplotlib 3.5.0 and 3.5.1.
Running
matrixprofile.analyze()
causesAttributeError: 'NoneType' object has no attribute 'get_subplotspec'
when matplotlib version 3.5.0 is installed. All plots seem to be shown correctly, but due to the exception, the function never returns. Upgrading to matplotlib 3.5.1 resolves the issue.The matrixprofile package lists
matplotlib>=3.0.3
inrequirements.txt
. I haven't tested any other versions for this issue, but it might be worth addingmatplotlib!=3.5.0
to the package requirements if this is a matplotlib bug and can't be fixed in matrixprofile itself.To Reproduce Environment setup:
Run the following in an IPython notebook:
It should throw an
AttributeError
. Then, restart the kernel, upgrade matplotlib withpip install matplotlib==3.5.1
, and rerun the cell (it should run successfully).Expected behavior
matrixprofile.analyze()
returns without any errors on both matplotlib 3.5.0 and 3.5.1.Desktop