All Projects → zhustec → ascii_chart

zhustec / ascii_chart

Licence: MIT License
Nice-looking lightweight console ASCII line charts ╭┈╯. Port of kroitor/asciichart.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to ascii chart

Csconsoleformat
.NET C# library for advanced formatting of console output [Apache]
Stars: ✭ 296 (+1133.33%)
Mutual labels:  console, ascii, ascii-art
Asciichart
Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
Stars: ✭ 1,107 (+4512.5%)
Mutual labels:  console, chart, ascii
asciichart-sharp
C# port of asciichart
Stars: ✭ 27 (+12.5%)
Mutual labels:  console, chart, ascii
Ervy
Bring charts to terminal.
Stars: ✭ 1,530 (+6275%)
Mutual labels:  console, chart, ascii
Ascii canvas
ASCII canvas for drawing in console
Stars: ✭ 11 (-54.17%)
Mutual labels:  console, ascii, ascii-art
Tcharts.js
📉 Lightweight and fast terminal ASCII charts for nodejs and browser.
Stars: ✭ 172 (+616.67%)
Mutual labels:  console, chart, ascii
outfancy
Python3 library to print tables in Terminal.
Stars: ✭ 47 (+95.83%)
Mutual labels:  ascii, ascii-art
magrrite
Generate ASCII art from any image
Stars: ✭ 21 (-12.5%)
Mutual labels:  ascii, ascii-art
asciju
Conversion of Image, video, text into ASCII format
Stars: ✭ 11 (-54.17%)
Mutual labels:  ascii, ascii-art
smag
Show Me A Graph - Command Line Graphing
Stars: ✭ 78 (+225%)
Mutual labels:  console, chart
alfred-figlet
🔠 Alfred 3 workflow to asciify plain text using figlet.js
Stars: ✭ 16 (-33.33%)
Mutual labels:  ascii, ascii-art
jpgtxt
Generating jpg files that can be viewed both in image viewer and text editor (as ASCII art)
Stars: ✭ 24 (+0%)
Mutual labels:  ascii, ascii-art
ctable
C library to print nicely formatted tables
Stars: ✭ 13 (-45.83%)
Mutual labels:  console, ascii
asciiarena
Terminal multiplayer deathmatch game
Stars: ✭ 34 (+41.67%)
Mutual labels:  ascii, ascii-art
ascii.js
A web-font-based rendering engine for displaying DOS/Amiga ASCII artwork on the web as text
Stars: ✭ 25 (+4.17%)
Mutual labels:  ascii, ascii-art
ascii-art
ASCII art images for Neofetch (and beyond)
Stars: ✭ 27 (+12.5%)
Mutual labels:  ascii, ascii-art
Picture-To-Ascii
Converts a picture to Ascii.
Stars: ✭ 18 (-25%)
Mutual labels:  ascii, ascii-art
ascii-art
Given a image.bmp and a M x N group of pixels, generate a text that represents the image.bmp in ascii characters
Stars: ✭ 16 (-33.33%)
Mutual labels:  ascii, ascii-art
durdraw
Animated Unicode, ANSI and ASCII Art Editor for Linux/Unix/macOS
Stars: ✭ 55 (+129.17%)
Mutual labels:  ascii, ascii-art
asciisciit
ASCII Art, Video, and Plotting Toolbox
Stars: ✭ 71 (+195.83%)
Mutual labels:  ascii, ascii-art

Ascii Chart

Gem Travis Coveralls license

Nice-looking lightweight console ASCII line charts ╭┈╯. Port of kroitor/asciichart.

Installation

Add this line to your application's Gemfile:

gem 'ascii_chart'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ascii_chart

Usage

require 'ascii_chart'

AsciiChart.plot((0...90).map { |i|
 Math.cos(i * ((Math::PI * 8) / 90)).round(2) * 10
})

Some sample cases are provided, to see them, execute:

$ rake -T sample
rake sample:1       # Output the first case
rake sample:2       # Output the second case
rake sample:3       # Output the third case
rake sample:random  # Out put a random case

e.g. For an random case, execute:

$ rake sample:random
    5.00  ┼---╮                                     ╭------╮                                     ╭--
    4.00  ┤   ╰-╮                                 ╭-╯      ╰-╮                                 ╭-╯  
    3.00  ┤     ╰-╮                             ╭-╯          ╰-╮                             ╭-╯    
    2.00  ┤       ╰-╮                         ╭-╯              ╰-╮                         ╭-╯      
    1.00  ┤         ╰╮                       ╭╯                  ╰╮                       ╭╯        
    0.00  ┼          ╰╮                     ╭╯                    ╰╮                     ╭╯         
   -1.00  ┤           ╰-╮                 ╭-╯                      ╰-╮                 ╭-╯          
   -2.00  ┤             ╰╮               ╭╯                          ╰╮               ╭╯            
   -3.00  ┤              ╰-╮           ╭-╯                            ╰-╮           ╭-╯             
   -4.00  ┤                ╰--╮     ╭--╯                                ╰--╮     ╭--╯               
   -5.00  ┤                   ╰-----╯                                      ╰-----╯                  
    9.00  ┤        ╭╮                   ╭╮                   ╭╮          ╭╮   ╭╮
    8.00  ┤  ╭╮    ||                   ||       ╭-╮  ╭╮     || ╭╮       ||   ||                ╭╮
    7.00  ┤  ||    ||                   ||   ╭╮╭╮| |  ||╭╮  ╭╯| ||  ╭╮   ||   ||                ||
    6.00  ┤  ||    ||                   ||╭╮ ||||| |  ||||  | | ||  ||╭╮ |╰-╮ ||   ╭╮           ||
    5.00  ┤╭╮||    ||                   |||| ||||| | ╭╯|||  | | || ╭╯||| |  | |╰╮  ||         ╭╮||
    4.00  ┤||||    ||                   |||╰╮||||| | | |||  | | || | ||| |  | | |  ||         ||||
    3.00  ┤||||    ||                   ||| |||||| | | |||  | | || | ||╰╮|  | | |  || ╭╮      ||||
    2.00  ┤||||    ||                 ╭╮||| |||||| | | ||| ╭╯ | || | ╰╯ ||  | | ╰╮ || ||      ||||
    1.00  ┼╯||╰-╮  ||      ╭╮         ||||| |||||| |╭╯ ||╰╮|  |╭╯| |    ||  | |  | || ||      ||||
    0.00  ┼ ╰╯  |  ||╭╮    || ╭-╮     |||╰╯ ||╰╯|| ||  || ╰╯  ╰╯ | |    ||  | |  | || ||  ╭╮  |||| ╭
   -1.00  ┤     |  ||||    || | |     |||   ||  || ||  ||        ╰╮|    ||  | |  | || ||  |╰╮ |||| |
   -2.00  ┤     |  ||||    || | |     |||   ╰╯  || ||  ||         ||    ||  | |  | ||╭╯|  | | |╰╯| |
   -3.00  ┤     |╭╮||||    || | |     |||       || ||  ||         ╰╯    ||  | |  | |╰╯ ╰-╮| | |  | |
   -4.00  ┤     |||||||╭╮  || | |     |||       || ||  ||               ╰╯  | |  | |     || | |  | |
   -5.00  ┤     ╰╯|||||||╭-╯|╭╯ |    ╭╯||       || ||  ╰╯                   | |  | |     || ╰-╯  | |
   -6.00  ┤       ||||╰╯╰╯  ||  |    | ||       ╰╯ ||                       ╰-╯  | |     ||      | |
   -7.00  ┤       ||||      ||  |╭-╮ | ╰╯          ╰╯                            | |     ||      | |
   -8.00  ┤       ╰╯╰╯      ╰╯  ╰╯ | |                                           |╭╯     ||      | |
   -9.00  ┤                        ╰-╯                                           ╰╯      ╰╯      ╰-╯

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/zhustec/ascii_chart. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].