Class: Charty::Plotters::DistributionPlotter
- Inherits:
-
AbstractPlotter
- Object
- AbstractPlotter
- Charty::Plotters::DistributionPlotter
- Defined in:
- lib/charty/plotters/distribution_plotter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#color_norm ⇒ Object
Returns the value of attribute color_norm.
-
#input_format ⇒ Object
readonly
Returns the value of attribute input_format.
-
#legend ⇒ Object
Returns the value of attribute legend.
-
#plot_data ⇒ Object
readonly
Returns the value of attribute plot_data.
-
#var_types ⇒ Object
readonly
Returns the value of attribute var_types.
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
-
#weights ⇒ Object
Returns the value of attribute weights.
Attributes inherited from AbstractPlotter
#color, #color_order, #data, #key_color, #palette, #x, #y
Instance Method Summary collapse
- #flat_structure ⇒ Object
-
#initialize(data:, variables:, **options, &block) ⇒ DistributionPlotter
constructor
A new instance of DistributionPlotter.
Methods inherited from AbstractPlotter
#inspect, #processed_data, #render, #save, #to_iruby, #to_iruby_mimebundle, #var_levels
Constructor Details
#initialize(data:, variables:, **options, &block) ⇒ DistributionPlotter
Returns a new instance of DistributionPlotter.
10 11 12 13 14 15 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 10 def initialize(data:, variables:, **, &block) x, y, color = variables.values_at(:x, :y, :color) super(x, y, color, data: data, **, &block) setup_variables end |
Instance Attribute Details
#color_norm ⇒ Object
Returns the value of attribute color_norm.
25 26 27 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 25 def color_norm @color_norm end |
#input_format ⇒ Object (readonly)
Returns the value of attribute input_format.
44 45 46 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 44 def input_format @input_format end |
#legend ⇒ Object
Returns the value of attribute legend.
34 35 36 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 34 def legend @legend end |
#plot_data ⇒ Object (readonly)
Returns the value of attribute plot_data.
44 45 46 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 44 def plot_data @plot_data end |
#var_types ⇒ Object (readonly)
Returns the value of attribute var_types.
44 45 46 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 44 def var_types @var_types end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
23 24 25 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 23 def variables @variables end |
#weights ⇒ Object
Returns the value of attribute weights.
17 18 19 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 17 def weights @weights end |
Instance Method Details
#flat_structure ⇒ Object
4 5 6 7 8 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 4 def flat_structure { x: :values } end |