Module: Charty::PlotMethods

Included in:
Charty
Defined in:
lib/charty/plot_methods.rb

Instance Method Summary collapse

Instance Method Details

#bar_plot(x = nil, y = nil, color = nil, **options, &block) ⇒ Object

Show the given data as rectangular bars.

Parameters:

  • x (defaults to: nil)
  • y (defaults to: nil)
  • color (defaults to: nil)
  • data


9
10
11
# File 'lib/charty/plot_methods.rb', line 9

def bar_plot(x=nil, y=nil, color=nil, **options, &block)
  Plotters::BarPlotter.new(x, y, color, **options, &block)
end

#box_plot(x = nil, y = nil, color = nil, **options, &block) ⇒ Object



13
14
15
# File 'lib/charty/plot_methods.rb', line 13

def box_plot(x=nil, y=nil, color=nil, **options, &block)
  Plotters::BoxPlotter.new(x, y, color, **options, &block)
end