Class: Charty::Plotters::HistogramPlotter
- Inherits:
-
DistributionPlotter
- Object
- AbstractPlotter
- DistributionPlotter
- Charty::Plotters::HistogramPlotter
- Defined in:
- lib/charty/plotters/histogram_plotter.rb
Instance Attribute Summary collapse
-
#bins ⇒ Object
Returns the value of attribute bins.
-
#kde ⇒ Object
TODO: element TODO: fill TODO: shrink.
-
#kde_params ⇒ Object
Returns the value of attribute kde_params.
-
#multiple ⇒ Object
TODO: bin_width TODO: bin_range TODO: discrete TODO: cumulative TODO: common_bins TODO: common_norm.
-
#stat ⇒ Object
Returns the value of attribute stat.
-
#weights ⇒ Object
Returns the value of attribute weights.
Attributes inherited from DistributionPlotter
#color_norm, #input_format, #legend, #plot_data, #var_types, #variables
Attributes inherited from AbstractPlotter
#color, #color_order, #data, #key_color, #palette, #x, #y
Instance Method Summary collapse
Methods inherited from DistributionPlotter
Methods inherited from AbstractPlotter
#initialize, #inspect, #processed_data, #render, #save, #to_iruby, #to_iruby_mimebundle, #var_levels
Constructor Details
This class inherits a constructor from Charty::Plotters::DistributionPlotter
Instance Attribute Details
#bins ⇒ Object
Returns the value of attribute bins.
48 49 50 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 48 def bins @bins end |
#kde ⇒ Object
TODO: element TODO: fill TODO: shrink
102 103 104 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 102 def kde @kde end |
#kde_params ⇒ Object
Returns the value of attribute kde_params.
108 109 110 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 108 def kde_params @kde_params end |
#multiple ⇒ Object
TODO: bin_width TODO: bin_range TODO: discrete TODO: cumulative TODO: common_bins TODO: common_norm
74 75 76 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 74 def multiple @multiple end |
#stat ⇒ Object
Returns the value of attribute stat.
25 26 27 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 25 def stat @stat end |
#weights ⇒ Object
Returns the value of attribute weights.
15 16 17 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 15 def weights @weights end |
Instance Method Details
#univariate? ⇒ Boolean
4 5 6 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 4 def univariate? self.variables.key?(:x) != self.variables.key?(:y) end |
#univariate_variable ⇒ Object
8 9 10 11 12 13 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 8 def univariate_variable unless univariate? raise TypeError, "This is not a univariate plot" end ([:x, :y] & self.variables.keys)[0] end |