Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent panics when data is flat #8

Merged
merged 2 commits into from
Jul 3, 2018

Conversation

xordspar0
Copy link
Contributor

This avoids division by 0 that occurs when the incoming data is all one value. Instead of panicing, Plot should now plot flat data as expected, in a flat line.

@xordspar0
Copy link
Contributor Author

I fumbled around with this a bit, and I'm not 100% confident I made the right choices about what to do to avoid the division by zero errors. Please request changes or corrections if you see any way this could be better.

@coveralls
Copy link

coveralls commented Jul 3, 2018

Pull Request Test Coverage Report for Build 34

  • 13 of 13 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.1%) to 76.639%

Totals Coverage Status
Change from base Build 36: 1.1%
Covered Lines: 187
Relevant Lines: 244

💛 - Coveralls

@guptarohit
Copy link
Owner

This looks good 👍

@guptarohit guptarohit merged commit 9447d46 into guptarohit:master Jul 3, 2018
@xordspar0 xordspar0 deleted the flat-panic branch July 3, 2018 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants