DrMarc / slab

python classes for working with sounds and conducting psychoacoustic experiments
MIT License
22 stars 7 forks source link

BUG in slab.Sound.cochleagram #63

Closed DrMarc closed 1 year ago

DrMarc commented 1 year ago

File ~/miniconda3/lib/python3.10/site-packages/slab/sound.py:1087, in Sound.cochleagram(self, bandwidth, show, axis) 1085 if show or (axis is not None): 1086 if not matplotlib is False: -> 1087 raise ImportError('Plotting cochleagrams requires matplotlib.') 1088 cmap = matplotlib.cm.get_cmap('Greys') 1089 if axis is None:

ImportError: Plotting cochleagrams requires matplotlib.

To Reproduce Minimal code example. This should ideally run as is, without additional data. Include all imports. For instance:

import slab sig = slab.Sound.tone() sig.cochleagram()

Expected behaviour plot of the cochleagram

Actual behaviour ImportError

OS and Version: seen on MacOS, but almost certainly OS independent