Class: Rust::Plots::Grid

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

Instance Method Summary collapse

Methods inherited from Renderable

#[]=

Constructor Details

#initializeGrid

Returns a new instance of Grid.



202
203
204
205
206
207
# File 'lib/rust/plots/core.rb', line 202

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

Instance Method Details

#_renderObject



245
246
247
248
249
250
251
252
253
254
255
# File 'lib/rust/plots/core.rb', line 245

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

#auto_xObject



221
222
223
224
225
# File 'lib/rust/plots/core.rb', line 221

def auto_x
    @x = nil
    
    return self
end

#auto_yObject



227
228
229
230
231
# File 'lib/rust/plots/core.rb', line 227

def auto_y
    @y = nil
    
    return self
end

#hide_xObject



233
234
235
236
237
# File 'lib/rust/plots/core.rb', line 233

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

#hide_yObject



239
240
241
242
243
# File 'lib/rust/plots/core.rb', line 239

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

#x(value) ⇒ Object



209
210
211
212
213
# File 'lib/rust/plots/core.rb', line 209

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

#y(value) ⇒ Object



215
216
217
218
219
# File 'lib/rust/plots/core.rb', line 215

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