mirror of
https://github.com/clearml/clearml
synced 2025-06-23 01:55:38 +00:00
Fix Pyplot/Matplotlib binding reports incorrect line labels and colors (#791)
This commit is contained in:
parent
1eee271f01
commit
4945182fa4
@ -498,7 +498,7 @@ class PatchedMatplotlib:
|
|||||||
lines_ = plotly_renderer.plotly_fig['data']
|
lines_ = plotly_renderer.plotly_fig['data']
|
||||||
half_mark = len(lines_)//2
|
half_mark = len(lines_)//2
|
||||||
if len(lines_) % 2 == 0 and \
|
if len(lines_) % 2 == 0 and \
|
||||||
all(ln for ln in lines_[half_mark:] if not ln.get('x') and not ln.get('y')):
|
all(not ln.get('x') and not ln.get('y') for ln in lines_[half_mark:]):
|
||||||
for i, line in enumerate(lines_[:half_mark]):
|
for i, line in enumerate(lines_[:half_mark]):
|
||||||
line['name'] = lines_[i+half_mark].get('name')
|
line['name'] = lines_[i+half_mark].get('name')
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
Reference in New Issue
Block a user