Catalog · How the catalog works
ascii_diagram
ASCII art diagram generator
- ★ 23 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
ascii diagram
ASCII art diagram generator
Creates text-diagrams based on a list of numbers.
- Data is automatically scaled to fit.
- Configurable dimensions
- Can interpolate between points
- Using the right characters, it can draw 2 different Y values on 1 line.
- Optional horizontal and vertical marker lines

Examples
Points, with interpolation
<pre>
5 ┼────┼───▄▄▄▄▄──┼────┼─────┼────┼────┼────┼▄▄▄▄▄┼────┼────┼─────┼─
4 | | ▄▀ | ▀▄| | | | | ▄▀ ▀▄ | | |
3 ┼────┼▀────┼────▀────┼─────┼────┼────┼──▀─┼─────┼─▀──┼────┼─────┼─
2 | ▀ | |▀ | | | | ▀ | | ▀ | | |
1 ┼───▀┼─────┼────┼─▀──┼─────┼────┼────┼▀───┼─────┼───▀┼────┼─────┼─
0 | ▀ | | | ▀▄| | | ▄▀ | | ▀▄ | |
-1 ┼────┼─────┼────┼────▄─────┼────┼──▄─┼────┼─────┼────┼─▄──┼─────┼─
-2 | | | | |▄ | | ▄ | | | | ▄ | |
-3 ┼────┼─────┼────┼────┼─▄───┼────┼▄───┼────┼─────┼────┼───▄┼─────┼─
-4 | | | | | ▀▄ | ▄▀ | | | | ▀▄ |▄
-5 ┼────┼─────┼────┼────┼────▀▀▀▀▀─┼────┼────┼─────┼────┼────┼─▀▀▀▀▀─
━┻━━━━┻━━━━━┻━━━━┻━━━━┻━━━━━┻━━━━┻━━━━┻━━━━┻━━━━━┻━━━━┻━━━━┻━━━━━┻━━
0 10 20 30 40 50 60 70 80 90 100 110 12
</pre>
Filled, no vertical lines <pre> 5 ──────────▄▄▄▄▄▄▄▄▄▄▄─────────────────────────
- 3 ▄█████████████████▄
- 7 ───▄███████████████████████▄────────────────── 0 █████████████████████████████▄▄
-1.67 ─████████████████████████████████▄▄───────────
-3.33 ███████████████████████████████████▄▄▄
-5 ─█████████████████████████████████████████████
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
0 10 20 30 40 5
</pre>
Using standard ASCII characters only <pre> 5 | | ########### | | | |
- 3 | #### |#### | | | |
- 6 | ## | | ## | | | |
- 9 | ### | | ### | | | |
- 2 | # | | # | | | |
- 5 | ### | | ## | | | #
- 8 |# | | |# | | | #
-0.38 | | | ### | | | ##
-1.15 | | | | ## | | |###
-1.92 | | | | ## | | #
-2.69 | | | | ## | | ##|
-3.46 | | | | ### | ### |
-4.23 | | | | | ### | #### |
-5 | | | | | ########### |
____________________________________________________________________________________
0 10 20 30 40 50 60
</pre>

