Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

ascii_diagram

ASCII art diagram generator

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate 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

Screenshot

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 ──────────▄▄▄▄▄▄▄▄▄▄▄─────────────────────────

  1. 3 ▄█████████████████▄
  2. 7 ───▄███████████████████████▄────────────────── 0 █████████████████████████████▄▄

-1.67 ─████████████████████████████████▄▄─────────── -3.33 ███████████████████████████████████▄▄▄
-5 ─█████████████████████████████████████████████ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0 10 20 30 40 5 </pre>

Using standard ASCII characters only <pre> 5 | | ########### | | | |

  1. 3 | #### |#### | | | |
  2. 6 | ## | | ## | | | |
  3. 9 | ### | | ### | | | |
  4. 2 | # | | # | | | |
  5. 5 | ### | | ## | | | #
  6. 8 |# | | |# | | | #

-0.38 | | | ### | | | ##
-1.15 | | | | ## | | |###
-1.92 | | | | ## | | #
-2.69 | | | | ## | | ##|
-3.46 | | | | ### | ### |
-4.23 | | | | | ### | #### |
-5 | | | | | ########### |
____________________________________________________________________________________ 0 10 20 30 40 50 60
</pre>