Class: Charty::Plotters::HistogramPlotter
- Inherits:
-
DistributionPlotter
- Object
- AbstractPlotter
- DistributionPlotter
- Charty::Plotters::HistogramPlotter
- Defined in:
- lib/charty/plotters/histogram_plotter.rb
Instance Attribute Summary collapse
-
#bin_range ⇒ Object
TODO: bin_width.
-
#bins ⇒ Object
Returns the value of attribute bins.
-
#common_bins ⇒ Object
TODO: discrete TODO: cumulative.
-
#kde ⇒ Object
TODO: element TODO: fill TODO: shrink.
-
#kde_params ⇒ Object
Returns the value of attribute kde_params.
-
#multiple ⇒ Object
TODO: common_norm.
-
#stat ⇒ Object
Returns the value of attribute stat.
Attributes inherited from DistributionPlotter
#color_norm, #input_format, #legend, #plot_data, #var_types, #variables, #weights
Attributes inherited from AbstractPlotter
#color, #color_order, #data, #key_color, #palette, #title, #x, #x_label, #y, #y_label
Instance Method Summary collapse
Methods inherited from DistributionPlotter
#flat_structure, #initialize, #wide_structure
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
#bin_range ⇒ Object
TODO: bin_width
59 60 61 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 59 def bin_range @bin_range end |
#bins ⇒ Object
Returns the value of attribute bins.
38 39 40 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 38 def bins @bins end |
#common_bins ⇒ Object
TODO: discrete TODO: cumulative
90 91 92 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 90 def common_bins @common_bins end |
#kde ⇒ Object
TODO: element TODO: fill TODO: shrink
126 127 128 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 126 def kde @kde end |
#kde_params ⇒ Object
Returns the value of attribute kde_params.
132 133 134 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 132 def kde_params @kde_params end |
#multiple ⇒ Object
TODO: common_norm
98 99 100 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 98 def multiple @multiple end |
#stat ⇒ Object
Returns the value of attribute stat.
15 16 17 |
# File 'lib/charty/plotters/histogram_plotter.rb', line 15 def stat @stat 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 |