Last active
August 29, 2015 14:13
-
-
Save domitry/fd6f5204ab8726f886cb to your computer and use it in GitHub Desktop.
Draft version of Nyaplot v2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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