Module: Nyaplot::Diagrams::Scatter

Includes:
Jsonizable
Defined in:
lib/nyaplot/diagram.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Jsonizable

#before_to_json, #get_property, included, #init_properties, #set_property, #to_json

Instance Attribute Details

#colorArray<String>


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#fill_bySymbol


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#legendBool


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#shapeArray<String>


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#shape_bySymbol


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#sizeArray<Numeric>


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#size_bySymbol


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#stroke_colorString


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#stroke_widthNumeric


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#titleString


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#tooltip_contentsArray<Symbol>


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#xSymbol


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

#ySymbol


171
# File 'lib/nyaplot/diagram.rb', line 171

define_group_properties(:options, [:title, :x, :y, :fill_by, :shape_by, :size_by, :color, :shape, :size, :stroke_color, :stroke_width, :tooltip_contents, :legend])

Instance Method Details

#process_data(df, labels) ⇒ Object


173
174
175
176
177
178
179
180
# File 'lib/nyaplot/diagram.rb', line 173

def process_data(df, labels)
  label_x = labels[0]
  label_y = labels[1]
  x(label_x)
  y(label_y)
  @xrange = [df[label_x].to_a.min, df[label_x].to_a.max]
  @yrange = [df[label_y].to_a.min, df[label_y].to_a.max]
end

#zoom?Boolean


182
183
184
# File 'lib/nyaplot/diagram.rb', line 182

def zoom?
  true
end