Class: Rust::Plots::ScatterPlot
Instance Method Summary
collapse
Methods inherited from BasePlot
#[]=, #_add_renderable, #_do_not_override_options!, #axis, #color, #grid, #palette, #pdf, #show, #title, #x_label, #x_range, #y_label, #y_range
Constructor Details
#initialize(x = nil, y = nil, **options) ⇒ ScatterPlot
Returns a new instance of ScatterPlot.
5
6
7
8
9
10
11
|
# File 'lib/rust/plots/basic-plots.rb', line 5
def initialize(x = nil, y = nil, **options)
super()
@series = []
if x && y
self.series(x, y, **options)
end
end
|
Instance Method Details
25
26
27
28
29
|
# File 'lib/rust/plots/basic-plots.rb', line 25
def lines()
self['type'] = "l"
return self
end
|
#lines_and_points ⇒ Object
37
38
39
40
41
|
# File 'lib/rust/plots/basic-plots.rb', line 37
def lines_and_points()
self['type'] = "b"
return self
end
|
31
32
33
34
35
|
# File 'lib/rust/plots/basic-plots.rb', line 31
def points()
self['type'] = "p"
return self
end
|
#series(x, y, **options) ⇒ Object
13
14
15
16
17
|
# File 'lib/rust/plots/basic-plots.rb', line 13
def series(x, y, **options)
@series << [x, y, options]
return self
end
|
#thickness(t) ⇒ Object
19
20
21
22
23
|
# File 'lib/rust/plots/basic-plots.rb', line 19
def thickness(t)
self['lwd'] = t
return self
end
|