Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/redplot.rb

Instance Method Summary collapse

Instance Method Details

#plot!(args = {}) ⇒ Object

this provide a quick hook for Array instances



221
222
223
224
225
226
227
# File 'lib/redplot.rb', line 221

def plot!(args={})
  args[:as] ||= :plot
  args[:in]   = self.singleton_class
  data = self
  RedPlot::insert(args) { todraw.add args[:style]  {data} }
  wrapper = self.send args[:as]
end

#plot_now!(args = {}) ⇒ Object

hook RedPlot to the array and draw what is inside it



229
230
231
# File 'lib/redplot.rb', line 229

def plot_now!(args={})
  self.plot!(args).draw
end