Commit 1b8373e1 authored by René Fritze's avatar René Fritze Committed by René Fritze

[vis] fix legend assertion in MPL plots

parent c2510210
Pipeline #62957 passed with stages
in 58 minutes and 35 seconds
......@@ -38,7 +38,7 @@ class MPLPlotBase:
if not config.HAVE_IPYWIDGETS and len(U[0]) > 1:
raise ImportError('cannot visualize: import of ipywidgets failed')
self.legend = (legend,) if isinstance(legend, str) else legend
assert legend is None or isinstance(legend, tuple) and len(legend) == len(U)
assert self.legend is None or isinstance(self.legend, tuple) and len(self.legend) == len(U)
self.plots = []
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment