Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/redplot.rb
Instance Method Summary collapse
-
#plot!(args = {}) ⇒ Object
this provide a quick hook for Array instances.
-
#plot_now!(args = {}) ⇒ Object
hook RedPlot to the array and draw what is inside it.
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 |