Skip to content

Commit 54623cd

Browse files
committed
2 parents bef6ae1 + cbf82f7 commit 54623cd

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Terminal Plotter is script that reads numeric data from a file (by default `data.txt`) and displays it as a live-updating plot in the terminal using [plotext](https://pypi.org/project/plotext/). The plot shows a moving time window (TW) of the data, and you can interactively adjust the window's size and position using keyboard controls.
44

5+
<img width="1414" alt="image" src="https://github.com/user-attachments/assets/67a9179e-de13-44e3-9583-aa98f39b38b2" />
6+
7+
58
## Features
69

710
- **Live Plotting:**
@@ -60,7 +63,7 @@ Set the refresh interval in seconds (default: 2 seconds).
6063
### Run the script
6164
First, Run the script with a 20-point window, reading from mydata.txt, and updating every 1.5 seconds:
6265

63-
`python a.py --window 20 --file mydata.txt --interval 1.5`
66+
`python a.py -w 20 -f mydata.txt -i 1.5`
6467

6568

6669
### Feeding Data to the Plot
@@ -69,11 +72,11 @@ The script reads numeric values from the data file—one value per line. To see
6972

7073
Test by appending single values by hand:
7174

72-
```bash
73-
echo "3.14" >> data.txt
74-
echo "4" >> data.txt
75-
```
75+
```bash
76+
echo "3.14" >> data.txt
77+
echo "4" >> data.txt
78+
```
7679

7780
Test of plotting a ping command
7881

79-
`ping www.toyota.co |awk '{print $7; fflush()}'|awk -F'=' '{print $2; fflush()}' >> data.txt`
82+
`ping www.toyota.co |awk '{print $7; fflush()}'|awk -F'=' '{print $2; fflush()}' >> data.txt`

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
plotext

0 commit comments

Comments
 (0)