Class: Rust::Plots::Grid
- Inherits:
-
Renderable
- Object
- Renderable
- Rust::Plots::Grid
- Defined in:
- lib/rust/plots/core.rb
Overview
Represents a grid for a plot.
Instance Method Summary collapse
- #_render ⇒ Object
-
#auto_x ⇒ Object
Automatically sets the x intervals.
-
#auto_y ⇒ Object
Automatically sets the y intervals.
-
#hide_x ⇒ Object
Hides x axis lines.
-
#hide_y ⇒ Object
Hides y axis lines.
-
#initialize ⇒ Grid
constructor
Creates a new grid.
-
#x(value) ⇒ Object
Sets the x intervals.
-
#y(value) ⇒ Object
Sets the y intervals.
Methods inherited from Renderable
Constructor Details
Instance Method Details
#_render ⇒ Object
335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/rust/plots/core.rb', line 335 def _render() function = Rust::Function.new("grid") function.arguments << @x function.arguments << @y function. = @options function.call return self end |
#auto_x ⇒ Object
Automatically sets the x intervals.
302 303 304 305 306 |
# File 'lib/rust/plots/core.rb', line 302 def auto_x @x = nil return self end |
#auto_y ⇒ Object
Automatically sets the y intervals.
311 312 313 314 315 |
# File 'lib/rust/plots/core.rb', line 311 def auto_y @y = nil return self end |
#hide_x ⇒ Object
Hides x axis lines.
320 321 322 323 324 |
# File 'lib/rust/plots/core.rb', line 320 def hide_x @x = Float::NAN return self end |
#hide_y ⇒ Object
Hides y axis lines.
329 330 331 332 333 |
# File 'lib/rust/plots/core.rb', line 329 def hide_y @y = Float::NAN return self end |
#x(value) ⇒ Object
Sets the x intervals.
284 285 286 287 288 |
# File 'lib/rust/plots/core.rb', line 284 def x(value) @x = value return self end |
#y(value) ⇒ Object
Sets the y intervals.
293 294 295 296 297 |
# File 'lib/rust/plots/core.rb', line 293 def y(value) @y = value return self end |