Skip to content

Instantly share code, notes, and snippets.

@domitry
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domitry/fd6f5204ab8726f886cb to your computer and use it in GitHub Desktop.
Save domitry/fd6f5204ab8726f886cb to your computer and use it in GitHub Desktop.
Draft version of Nyaplot v2.0
require 'nyaplot'
include Nyaplot
df = DataFrame.from_csv("hoge.csv")
df1 = df.clone
p1 = Plot.add(df1, :bar, :x, :y)
p2 = Plot.add(:scatter, x, y)
.add(:filter_x)
{|min, max|
df1 = df.select{|x| min < x && x < max}
p1.update
}.stage
.width 500
.height 400
column(p1, p2)
require 'nyaplot'
include Nyaplot
p1 = Plot.add(df, :scatter, :x, :y)
.color red
.fill_by :fill
.stage
.width 500
.height 500
p2 = Plot.add(df2, :bar, :x, ;y)
column(p1, p2).draw
require 'nyaplot'
include Nyaplot
red = Colors.Reds
Plot.add(:scatter, x, y)
.color red
.stage
.width 500
.height 500
.draw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment