xpsi-group/xpsi

AttributeError: 'Legend' object has no attribute 'legendHandles'.

Closed this issue · 1 comments

thjsal commented

When using the latest Matplotlib version and running the PostProcessing tutorial, I get this error:

AttributeError: 'Legend' object has no attribute 'legendHandles'.

It seems to be fixed by changing (in code block 12)
for legobj in _.legend.legendHandles: to
for legobj in _.legend.legend_handles:
The syntax for this has apparently changed in Matplotlib: matplotlib/matplotlib#20639

thjsal commented

Additionally, a bit unrelated issue, but I also needed to install ipywdigets package to run the signal plots using the PostProcessing jupyter notebook. Perhaps worth to mention that as a requirement. I installed it using this:

conda install -c conda-forge ipywidgets