diff --git a/CHANGELOG.md b/CHANGELOG.md index d8cc9b6..9b538b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [0.7.1] - 2024-03-30 + +### Added + +- CLI: Option to specify legends for series (`sl`) + ## [0.7.0] - 2024-03-30 ### Added @@ -81,6 +87,7 @@ All notable changes to this project will be documented in this file. - Prevent panics when data is flat. (#8) - Prevent BADPREC issue when maximum and minimum values in a series are 0. (#10) +[0.7.1]: https://github.com/guptarohit/asciigraph/releases/tag/v0.7.1 [0.7.0]: https://github.com/guptarohit/asciigraph/releases/tag/v0.7.0 [0.6.0]: https://github.com/guptarohit/asciigraph/releases/tag/v0.6.0 [0.5.6]: https://github.com/guptarohit/asciigraph/releases/tag/v0.5.6 diff --git a/README.md b/README.md index 3c7b298..e984dd7 100644 --- a/README.md +++ b/README.md @@ -236,11 +236,31 @@ Output: plot data from stdin ``` + Example of **real-time graph** for data points stream via stdin: -```bash + +Realtime graph for data points via stdin (google ping) using asciigraph + +
+command for above graph + +```sh ping -i.2 google.com | grep -oP '(?<=time=).*(?=ms)' --line-buffered | asciigraph -r -h 10 -w 40 -c "realtime plot data (google ping in ms) from stdin" ``` -[![asciinema][]][7] +
+ + +Example of **multi-series real-time graph** for data points stream via stdin: + +Ping latency comparison: Google (Blue) vs. DuckDuckGo (Red) with asciigraph + +
+command for above graph + +```sh +{unbuffer paste -d, <(ping -i 0.4 google.com | sed -u -n -E 's/.*time=(.*)ms.*/\1/p') <(ping -i 0.4 duckduckgo.com | sed -u -n -E 's/.*time=(.*)ms.*/\1/p') } | asciigraph -r -h 15 -w 60 -sn 2 -sc "blue,red" -c "Ping Latency Comparison" -sl "Google, DuckDuckGo" +``` +
## Acknowledgement @@ -269,6 +289,4 @@ Feel free to make a pull request! :octocat: [colored_graph_image]: https://user-images.githubusercontent.com/7895001/166443444-40ad8113-2c0f-46d7-9c75-1cf08435ce15.png [releases]: https://github.com/guptarohit/asciigraph/releases [asciichart]: https://github.com/kroitor/asciichart -[asciinema]: https://asciinema.org/a/382383.svg -[7]: https://asciinema.org/a/382383 [graph_with_legends_image]: https://github.com/guptarohit/asciigraph/assets/7895001/4066ee95-55ca-42a4-8a03-e73ce20df5d3