Class: Charty::Plotters::CategoricalPlotter

Inherits:
AbstractPlotter show all
Includes:
EstimationSupport
Defined in:
lib/charty/plotters/categorical_plotter.rb

Direct Known Subclasses

BarPlotter, BoxPlotter

Class Attribute Summary collapse

Instance Attribute Summary collapse

Attributes included from EstimationSupport

#ci, #estimator, #n_boot, #units

Attributes included from RandomSupport

#random

Attributes inherited from AbstractPlotter

#color, #color_order, #data, #key_color, #palette, #title, #x, #x_label, #y, #y_label

Instance Method Summary collapse

Methods included from EstimationSupport

check_estimator

Methods included from RandomSupport

check_random

Methods inherited from AbstractPlotter

#inspect, #processed_data, #render, #save, #to_iruby, #to_iruby_mimebundle, #var_levels

Constructor Details

#initialize(x, y, color, order: nil, orient: nil, width:, dodge: false, **options, &block) ⇒ CategoricalPlotter

Returns a new instance of CategoricalPlotter.



30
31
32
33
34
35
# File 'lib/charty/plotters/categorical_plotter.rb', line 30

def initialize(x, y, color, order: nil, orient: nil, width: 0.8r, dodge: false, **options, &block)
  super

  setup_variables
  setup_colors
end

Class Attribute Details

.default_paletteObject

Returns the value of attribute default_palette.



5
6
7
# File 'lib/charty/plotters/categorical_plotter.rb', line 5

def default_palette
  @default_palette
end

.require_numericObject

Returns the value of attribute require_numeric.



18
19
20
# File 'lib/charty/plotters/categorical_plotter.rb', line 18

def require_numeric
  @require_numeric
end

Instance Attribute Details

#dodgeObject

Returns the value of attribute dodge.



67
68
69
# File 'lib/charty/plotters/categorical_plotter.rb', line 67

def dodge
  @dodge
end

#group_labelObject (readonly)

Returns the value of attribute group_label.



103
104
105
# File 'lib/charty/plotters/categorical_plotter.rb', line 103

def group_label
  @group_label
end

#group_namesObject (readonly)

Returns the value of attribute group_names.



103
104
105
# File 'lib/charty/plotters/categorical_plotter.rb', line 103

def group_names
  @group_names
end

#orderObject

Returns the value of attribute order.



37
38
39
# File 'lib/charty/plotters/categorical_plotter.rb', line 37

def order
  @order
end

#orientObject

Returns the value of attribute orient.



43
44
45
# File 'lib/charty/plotters/categorical_plotter.rb', line 43

def orient
  @orient
end

#plot_dataObject (readonly)

Returns the value of attribute plot_data.



103
104
105
# File 'lib/charty/plotters/categorical_plotter.rb', line 103

def plot_data
  @plot_data
end

#saturationObject

Returns the value of attribute saturation.



73
74
75
# File 'lib/charty/plotters/categorical_plotter.rb', line 73

def saturation
  @saturation
end

#value_labelObject

Returns the value of attribute value_label.



105
106
107
# File 'lib/charty/plotters/categorical_plotter.rb', line 105

def value_label
  @value_label
end

#widthObject

Returns the value of attribute width.



61
62
63
# File 'lib/charty/plotters/categorical_plotter.rb', line 61

def width
  @width
end