Class: Rust::Plots::Axis
Constant Summary collapse
- BELOW =
1- LEFT =
2- ABOVE =
3- RIGHT =
4
Instance Method Summary collapse
- #_run ⇒ Object
- #at(values) ⇒ Object
- #horizontal_labels ⇒ Object
-
#initialize(side) ⇒ Axis
constructor
A new instance of Axis.
- #labels(value) ⇒ Object
- #vertical_labels ⇒ Object
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
#_run ⇒ Object
279 280 281 282 283 284 285 286 |
# File 'lib/rust-plots.rb', line 279 def _run() function = Rust::Function.new("axis") function. = @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_labels ⇒ Object
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_labels ⇒ Object
261 262 263 264 265 |
# File 'lib/rust-plots.rb', line 261 def vertical_labels self['las'] = 2 return self end |