I believe the color attribute is not required for this function, but after I correctly loaded an audio and called librosa.display.waveshow(y, sr=sr), it returns error like this:
"""
Traceback (most recent call last):
File "/Users/Sylvia_1/anaconda3/envs/forLibrosa/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3553, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-9fe4a8a9f0d7>", line 2, in <module>
librosa.display.waveshow(y, sr=sr)
File "/Users/Sylvia_1/anaconda3/envs/forLibrosa/lib/python3.11/site-packages/librosa/display.py", line 2042, in waveshow
kwargs.setdefault("color", next(axes._get_lines.prop_cycler)["color"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_process_plot_var_args' object has no attribute 'prop_cycler'
"""
Therefore, I added a color attribute value and tried again, it works. The waveform was correctly plotted.
why is this?