aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: f0e1a26682c49fd456ba7afd5dbaa8795dc5205e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# TextGraph

A small terminal utility which displays graphs as plain text,
with the goal of having few dependencies,
being lightweight, and reasonably performant.

It is meant to be used in a traditional unix way, 
by piping data through it.
It was written because I sometimes have the need to
watch some state in a sql table for a short while.

The documentation is in the manual file `tg.1`.

It is only tested with glibc and terminals with ansi escape code support.


## Example 1
Some examples of the different modes, from the same input file with random numbers
### Star mode
```
100┌─────────────────────────────────────────────┐
89 │           *                             *   │
79 │             *    *     *        **          │
68 │         **      *            *              │
58 │ *    *       *       *        *     *  *    │
47 │  *    *       *         *         *       **│
37 │*       *          *** *    *   *   *     *  │
26 │   *        *   *          *           *     │
16 │    **                    *  *        *      │
5  └─────────────────────────────────────────────┘
```
### Ascii mode
```
100┌─────────────────────────────────────────────┐
89 │          ╭╮                            ╭╮   │
79 │          ││╭╮   ╭╮    ╭╮       ╭─╮     ││   │
68 │        ╭─╯│││  ╭╯│    ││    ╭╮ │ │     ││   │
58 │╭╮   ╭╮ │  ││╰╮ │ │  ╭╮││    │╰╮│ │ ╭╮ ╭╯│   │
47 ││╰╮  │╰╮│  ││ ╰╮│ │  │││╰╮   │ ││ ╰╮││ │ │╭──┤
37 ├╯ │  │ ╰╯  ││  ││ ╰──╯╰╯ │ ╭╮│ ╰╯  ╰╯│ │ ╰╯  │
26 │  ╰╮ │     ╰╯  ╰╯        │╭╯││       │╭╯     │
16 │   ╰─╯                   ╰╯ ╰╯       ╰╯      │
5  └─────────────────────────────────────────────┘
```
### Braille mode (Probably the most buggy mode)
```
100┌────────────────────┐
89 │   ⠄⠂               │
79 │              ⠄     │
68 │  ⠠   ⠂     ⠠       │
58 │⠠   ⠠        ⠄  ⠂⠠  │
47 │          ⠄    ⠂   ⠂│
37 │ ⠠     ⠂ ⠄ ⠐ ⠠ ⠐    │
26 │     ⠠     ⠂     ⠂  │
16 │⠂         ⠠ ⠂   ⠐   │
5  └────────────────────┘
```

## Example 2
Example of a simple sinusoid
### Star
```
10 ┌──────────────────────────────────────────────────────────────────────┐
8  │                             **********                               │
6  │                        *****          *****                          │
3  │                     ***                    ***                       │
1  │                  ***                          ***                    │
-1 │               ***                                ***                 │
-3 │            ***                                      ***              │
-6 │        ****                                            ****          │
-8 │********                                                    **********│
-10└──────────────────────────────────────────────────────────────────────┘
```
### Ascii
```
10 ┌──────────────────────────────────────────────────────────────────────┐
8  │                            ╭─────────╮                               │
6  │                       ╭────╯         ╰────╮                          │
3  │                    ╭──╯                   ╰──╮                       │
1  │                 ╭──╯                         ╰──╮                    │
-1 │              ╭──╯                               ╰──╮                 │
-3 │           ╭──╯                                     ╰──╮              │
-6 │       ╭───╯                                           ╰───╮          │
-8 ├───────╯                                                   ╰──────────┤
-10└──────────────────────────────────────────────────────────────────────┘
```
### Braille
```
10 ┌───────────────────────────────────┐
8  │             ⠈⠑⠢⠤⠤⠔⠊⠁              │
6  │            ⠑⠄      ⠠⠊             │
3  │          ⠈⠢          ⠔⠁           │
1  │         ⠑⠄            ⠠⠊          │
-1 │        ⠡                ⠌         │
-3 │      ⠈⠢                  ⠔⠁       │
-6 │    ⠈⠑⠄                    ⠠⠊⠁     │
-8 │⠉⠉⠉⠒⠄                        ⠠⠒⠉⠉⠉⠒│
-10└───────────────────────────────────┘
```