SPF-OST / pytrnsys

Package that provides functionality to run and process, plot and report TRNSYS simulations
https://pytrnsys.readthedocs.io
GNU General Public License v3.0
11 stars 8 forks source link

BugFix by restarting the color list after exhausting it. #184

Closed ahobeost closed 6 months ago

sonarcloud[bot] commented 6 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

ahobeost commented 6 months ago

@zuckerruebe: This pull request has high priority for icegrids. Thanks!

zuckerruebe commented 6 months ago

How useful is a plot with duplicated colours?

ahobeost commented 6 months ago

This is a quick fix to overcome a common crashing error. As such plots with many colors are more for "data exploration" and not "published figures", this solution should be acceptable at this time.

Imo it would be better to work on the processing API than to try and teach pytrnsys how to plot these cases in a meaningful way.

zuckerruebe commented 6 months ago

Yeah, I was more thinking, even for data exploration, if you're unlucky you won't know which line belongs to which value. But often you can kind of figure out... If you have a logger handy in the code I'd maybe log a warning when we start duplicating colors. But it's up to your judgment and/or time. I'm also fine with you just hitting the merge button. Thansk for the fix!