Class: Rust::Plots::Axis

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

Constant Summary collapse

BELOW =
1
LEFT =
2
ABOVE =
3
RIGHT =
4

Instance Method Summary collapse

Methods inherited from Plugin

#[]=

Constructor Details

#initialize(side) ⇒ Axis

Returns a new instance of Axis.



247
248
249
250
251
252
253
# File 'lib/rust-plots.rb', line 247

def initialize(side)
    super()
    
    self['side'] = side
    self.at(nil)
    self.labels(true)
end

Instance Method Details

#_runObject



279
280
281
282
283
284
285
286
# File 'lib/rust-plots.rb', line 279

def _run()
    function = Rust::Function.new("axis")
    function.options = @options
    
    function.call
    
    return self
end

#at(values) ⇒ Object



255
256
257
258
259
# File 'lib/rust-plots.rb', line 255

def at(values)
    self['at'] = values
    
    return self
end

#horizontal_labelsObject



267
268
269
270
271
# File 'lib/rust-plots.rb', line 267

def horizontal_labels
    self['las'] = 1
    
    return self
end

#labels(value) ⇒ Object



273
274
275
276
277
# File 'lib/rust-plots.rb', line 273

def labels(value)
    self['labels'] = value
    
    return self
end

#vertical_labelsObject



261
262
263
264
265
# File 'lib/rust-plots.rb', line 261

def vertical_labels
    self['las'] = 2
    
    return self
end