GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - red-data-tools/unicode_plot.rb: Plot your data by Unicode characters

BranchesTags
Open more actions menu

Latest commit

 

History

135 Commits
135 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
example
example
 
 
img
img
 
 
lib
lib
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.yardopts
.yardopts
 
 
CHANGES.md
CHANGES.md
 
 
Gemfile
Gemfile
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
unicode_plot.gemspec
unicode_plot.gemspec
 
 

Repository files navigation

UnicodePlot - Plot your data by Unicode characters

UnicodePlot provides the feature to make charts with Unicode characters.

Documentation

https://red-data-tools.github.io/unicode_plot.rb/

Install

$ gem install unicode_plot

Usage

require 'unicode_plot'

x = 0.step(3*Math::PI, by: 3*Math::PI / 30)
y_sin = x.map {|xi| Math.sin(xi) }
y_cos = x.map {|xi| Math.cos(xi) }
plot = UnicodePlot.lineplot(x, y_sin, name: "sin(x)", width: 40, height: 10)
UnicodePlot.lineplot!(plot, x, y_cos, name: "cos(x)")
plot.render

You can get the results below by running the above script:

Supported charts

barplot

UnicodePlot.barplot(data: {'foo': 20, 'bar': 50}, title: "Bar").render

boxplot

UnicodePlot.boxplot(data: {foo: [1, 3, 5], bar: [3, 5, 7]}, title: "Box").render

densityplot

x = Array.new(500) { 20*rand - 10 } + Array.new(500) { 6*rand - 3 }
y = Array.new(1000) { 30*rand - 10 }
UnicodePlot.densityplot(x, y, title: "Density").render

histogram

x = Array.new(100) { rand(10) } + Array.new(100) { rand(30) + 10 }
UnicodePlot.histogram(x, title: "Histogram").render

lineplot

See Usage section above.

scatterplot

x = Array.new(50) { rand(20) - 10 }
y = x.map {|xx| xx*rand(30) - 10 }
UnicodePlot.scatterplot(x, y, title: "Scatter").render

Acknowledgement

This library is strongly inspired by UnicodePlot.jl.

License

MIT License

Author

  • Kenta Murata

About

Plot your data by Unicode characters

Topics

data-sciencedata-visualizationruby

Resources

Readme
MIT license
Activity
Custom properties

Stars

290 stars

Watchers

7 watching

Forks

11 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.