Class: Rust::Plots::Grid

Inherits:
Renderable show all
Defined in:
lib/rust-plots.rb

Instance Method Summary collapse

Methods inherited from Renderable

#[]=

Constructor Details

#initializeGrid

Returns a new instance of Grid.



301
302
303
304
305
306
# File 'lib/rust-plots.rb', line 301

def initialize
    super()
    
    @x = Float::NAN
    @y = Float::NAN
end

Instance Method Details

#_renderObject



344
345
346
347
348
349
350
351
352
353
354
# File 'lib/rust-plots.rb', line 344

def _render()
    function = Rust::Function.new("grid")
    
    function.arguments << @x
    function.arguments << @y
    function.options = @options
    
    function.call
    
    return self
end

#auto_xObject



320
321
322
323
324
# File 'lib/rust-plots.rb', line 320

def auto_x
    @x = nil
    
    return self
end

#auto_yObject



326
327
328
329
330
# File 'lib/rust-plots.rb', line 326

def auto_y
    @y = nil
    
    return self
end

#hide_xObject



332
333
334
335
336
# File 'lib/rust-plots.rb', line 332

def hide_x
    @x = Float::NAN
    
    return self
end

#hide_yObject



338
339
340
341
342
# File 'lib/rust-plots.rb', line 338

def hide_y
    @y = Float::NAN
    
    return self
end

#x(value) ⇒ Object



308
309
310
311
312
# File 'lib/rust-plots.rb', line 308

def x(value)
    @x = value
    
    return self
end

#y(value) ⇒ Object



314
315
316
317
318
# File 'lib/rust-plots.rb', line 314

def y(value)
    @y = value
    
    return self
end