Class: Charty::Plotters::LinePlotter

Inherits:
RelationalPlotter show all
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

Attributes included from RandomSupport

#random

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

Methods included from RandomSupport

check_random

Methods inherited from RelationalPlotter

#flat_structure

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: {}, **options, &block)
  x, y, color, style, size = variables.values_at(:x, :y, :color, :style, :size)
  super(x, y, color, style, size, data: data, **options, &block)

  @comp_data = nil
end

Instance Attribute Details

#err_kwsObject (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_styleObject

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_barObject

Returns the value of attribute error_bar.



125
126
127
# File 'lib/charty/plotters/line_plotter.rb', line 125

def error_bar
  @error_bar
end

#estimatorObject

Returns the value of attribute estimator.



77
78
79
# File 'lib/charty/plotters/line_plotter.rb', line 77

def estimator
  @estimator
end

#n_bootObject

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

#sortObject

Returns the value of attribute sort.



125
126
127
# File 'lib/charty/plotters/line_plotter.rb', line 125

def sort
  @sort
end

#x_scaleObject

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_scaleObject

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