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
#color ⇒ Array<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_by ⇒ 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])
|
#legend ⇒ Bool
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 ⇒ Array<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_by ⇒ 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])
|
#size ⇒ Array<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_by ⇒ 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])
|
#stroke_color ⇒ 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])
|
#stroke_width ⇒ 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])
|
#title ⇒ 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])
|
#tooltip_contents ⇒ Array<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])
|
#x ⇒ 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])
|
#y ⇒ 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])
|
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
|