File: ex_canvases.rb

package info (click to toggle)
ruby-unicode-plot 0.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,492 kB
  • sloc: ruby: 2,871; makefile: 4
file content (9 lines) | stat: -rwxr-xr-x 473 bytes parent folder | download
1
2
3
4
5
6
7
8
9
#!/bin/env ruby
$LOAD_PATH << "#{__dir__}/../lib"
require "unicode_plot"

# example of line plots using different canvases
UnicodePlot.lineplot([1, 2, 7], [9, -6, 8], title: "Default Lineplot").render
UnicodePlot.lineplot([1, 2, 7], [9, -6, 8], title: "Ascii Lineplot", canvas: :ascii).render
UnicodePlot.lineplot([1, 2, 7], [9, -6, 8], title: "Dot Lineplot", canvas: :dot).render
UnicodePlot.lineplot([1, 2, 7], [9, -6, 8], title: "Block Lineplot", canvas: :block).render