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.
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.
19 20 21 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 19 def color_norm @color_norm end |
#input_format ⇒ Object (readonly)
Returns the value of attribute input_format.
38 39 40 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 38 def input_format @input_format end |
#legend ⇒ Object
Returns the value of attribute legend.
28 29 30 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 28 def legend @legend end |
#plot_data ⇒ Object (readonly)
Returns the value of attribute plot_data.
38 39 40 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 38 def plot_data @plot_data end |
#var_types ⇒ Object (readonly)
Returns the value of attribute var_types.
38 39 40 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 38 def var_types @var_types end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
17 18 19 |
# File 'lib/charty/plotters/distribution_plotter.rb', line 17 def variables @variables 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 |