Class: Charty::Plotters::LinePlotter
- Inherits:
-
RelationalPlotter
- Object
- AbstractPlotter
- RelationalPlotter
- Charty::Plotters::LinePlotter
- Includes:
- RandomSupport
- Defined in:
- lib/charty/plotters/line_plotter.rb
Constant Summary collapse
- DEFAULT_ERROR_BAR_LEVELS =
{ ci: 95, pi: 95, se: 1, sd: 1 }.freeze
- VALID_ERROR_BAR_METHODS =
DEFAULT_ERROR_BAR_LEVELS.keys
Instance Attribute Summary collapse
-
#err_kws ⇒ Object
readonly
Returns the value of attribute err_kws.
-
#err_style ⇒ Object
Returns the value of attribute err_style.
-
#error_bar ⇒ Object
Returns the value of attribute error_bar.
-
#estimator ⇒ Object
Returns the value of attribute estimator.
-
#n_boot ⇒ Object
Returns the value of attribute n_boot.
-
#sort ⇒ Object
Returns the value of attribute sort.
-
#x_scale ⇒ Object
Returns the value of attribute x_scale.
-
#y_scale ⇒ Object
Returns the value of attribute y_scale.
Attributes included from RandomSupport
Attributes inherited from RelationalPlotter
#color_norm, #dashes, #input_format, #legend, #markers, #plot_data, #size, #size_norm, #size_order, #sizes, #style, #style_order, #units, #var_types, #variables
Attributes inherited from AbstractPlotter
#color, #color_order, #data, #key_color, #palette, #title, #x, #x_label, #y, #y_label
Instance Method Summary collapse
-
#err_params=(val) ⇒ Object
parameters to draw error bars/bands.
-
#initialize(data: nil, variables: {}, **options, &block) ⇒ LinePlotter
constructor
A new instance of LinePlotter.
Methods included from RandomSupport
Methods inherited from RelationalPlotter
Methods inherited from AbstractPlotter
#inspect, #processed_data, #render, #save, #to_iruby, #to_iruby_mimebundle, #var_levels
Constructor Details
#initialize(data: nil, variables: {}, **options, &block) ⇒ LinePlotter
Returns a new instance of LinePlotter.
70 71 72 73 74 75 |
# File 'lib/charty/plotters/line_plotter.rb', line 70 def initialize(data: nil, variables: {}, **, &block) x, y, color, style, size = variables.values_at(:x, :y, :color, :style, :size) super(x, y, color, style, size, data: data, **, &block) @comp_data = nil end |
Instance Attribute Details
#err_kws ⇒ Object (readonly)
Returns the value of attribute err_kws.
125 126 127 |
# File 'lib/charty/plotters/line_plotter.rb', line 125 def err_kws @err_kws end |
#err_style ⇒ Object
Returns the value of attribute err_style.
125 126 127 |
# File 'lib/charty/plotters/line_plotter.rb', line 125 def err_style @err_style end |
#error_bar ⇒ Object
Returns the value of attribute error_bar.
125 126 127 |
# File 'lib/charty/plotters/line_plotter.rb', line 125 def @error_bar end |
#estimator ⇒ Object
Returns the value of attribute estimator.
77 78 79 |
# File 'lib/charty/plotters/line_plotter.rb', line 77 def estimator @estimator end |
#n_boot ⇒ Object
Returns the value of attribute n_boot.
103 104 105 |
# File 'lib/charty/plotters/line_plotter.rb', line 103 def n_boot @n_boot end |
#sort ⇒ Object
Returns the value of attribute sort.
125 126 127 |
# File 'lib/charty/plotters/line_plotter.rb', line 125 def sort @sort end |
#x_scale ⇒ Object
Returns the value of attribute x_scale.
214 215 216 |
# File 'lib/charty/plotters/line_plotter.rb', line 214 def x_scale @x_scale end |
#y_scale ⇒ Object
Returns the value of attribute y_scale.
220 221 222 |
# File 'lib/charty/plotters/line_plotter.rb', line 220 def y_scale @y_scale end |
Instance Method Details
#err_params=(val) ⇒ Object
parameters to draw error bars/bands
146 147 148 149 150 151 |
# File 'lib/charty/plotters/line_plotter.rb', line 146 def err_params=(val) unless val.nil? raise NotImplementedError, "Specifying `err_params` is not supported" end end |