Issue #40 : Changes call `.Plot` on main.go to `.PlotMany`
This solves Issue #40 , cmd/asciigraph/main.go was modified to call always PlotMany.
The previous behavior is preserved. In order to add more plots to the graph, separate the values using comma: ,
I tested this with two files:
# data
1
2
3
4
5
# data_2
1,3
2,3
3,2
4,2
5,2
If a string don't contain a comma, and the strings.Split function is applied to it, you will have an array with one element. This edge case input is a valid argument to .PlotMany, so it will draw a single plot on the graph.
A follow up PR to this one could be modify the -sc flag so you can put a comma separated list of values (eg: -sc yellow,red), and the program the appropriate color for each plot (eg: yellow for the first plot, and red for the second plot)
Pull Request Test Coverage Report for Build 8488831541
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 95.89%
| Totals | |
|---|---|
| Change from base Build 8471941070: | 0.0% |
| Covered Lines: | 350 |
| Relevant Lines: | 365 |
💛 - Coveralls
Hey @KarlHeitmann, Thank you for creating the PR 😃 💚
Coincidentally, I was also working (mastodon post) on the same feat. 😄 feat branch: https://github.com/guptarohit/asciigraph/tree/multiple-data-stream-stdin-cli
I was thinking to update README and then open PR, Great that you opened it!
Going forward, I think we can merge our changes, (cherry-pick maybe 🤔)