Module: Nyaplot

Defined in:
lib/nyaplot/core.rb,
lib/nyaplot/data.rb,
lib/nyaplot/plot.rb,
lib/nyaplot/color.rb,
lib/nyaplot3d/core.rb,
lib/nyaplot/version.rb,
lib/nyaplot3d/plot3d.rb,
lib/nyaplot3d/diagram.rb,
lib/nyaplot/charts/bar.rb,
lib/nyaplot/charts/box.rb,
lib/nyaplot/exportable.rb,
lib/nyaplot/charts/base.rb,
lib/nyaplot/charts/line.rb,
lib/nyaplot/layers/base.rb,
lib/nyaplot/layers/html.rb,
lib/nyaplot/chart_method.rb,
lib/nyaplot/layers/tools.rb,
lib/nyaplot/layers/glyphs.rb,
lib/nyaplot/layers/layers.rb,
lib/nyaplot/charts/scatter.rb

Defined Under Namespace

Modules: ChartMethods, Charts, Diagrams3D, Exportable, Layers Classes: Color, Colors, DataFrame, Diagram3D, Plot, Plot3D, Series

Constant Summary collapse

VERSION =
"0.2.0.rc1"
@@url =
"http://http://nbviewer.ipython.org/"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.get_urlObject



59
60
61
# File 'lib/nyaplot/exportable.rb', line 59

def self.get_url
  @@url
end

.set_url(url) ⇒ Object



55
56
57
# File 'lib/nyaplot/exportable.rb', line 55

def self.set_url(url)
  @@url = url
end

Instance Method Details

#columns(*plots) ⇒ Object

Create multi-column layout

Examples:

include Nyaplot
p1 = Plot.add(:scatter, x1, y1)
p2 = Plot.add(:line, x2, y2)
columns(p1, p2).draw


11
12
13
14
15
16
# File 'lib/nyaplot/core.rb', line 11

def columns(*plots)
  panes = plots.map{|p| p.pane}
  plot = Plot.new
  plot.pane = Pane.columns(*panes)
  plot
end

#rows(*plots) ⇒ Object

Create multi-row layout

Examples:

include Nyaplot
p1 = Plot.add(:scatter, x1, y1)
p2 = Plot.add(:line, x2, y2)
p3 = Plot.add(:bar, x3, y3)
rows(columns(p1, p2), p3).draw


26
27
28
29
30
31
# File 'lib/nyaplot/core.rb', line 26

def rows(*plots)
  panes = plots.map{|p| p.pane}
  plot = Plot.new
  plot.pane = Pane.rows(*panes)
  plot
end