Class: Rust::Plots::GGPlot::Layer
- Defined in:
- lib/rust/external/ggplot2/core.rb
Direct Known Subclasses
AxisScaler, ExistingTheme, FlipCoordinates, Geom, Labels, Theme
Instance Method Summary collapse
-
#initialize(function_name, **options) ⇒ Layer
constructor
A new instance of Layer.
- #option(key, value) ⇒ Object
- #to_R ⇒ Object
Constructor Details
Instance Method Details
#option(key, value) ⇒ Object
21 22 23 |
# File 'lib/rust/external/ggplot2/core.rb', line 21 def option(key, value) @options[key] = value end |
#to_R ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/rust/external/ggplot2/core.rb', line 25 def to_R if !block_given? , arguments = @options, @arguments else , arguments = yield(@options, @arguments) end = Rust::Options.from_hash() unless .is_a?(Rust::Options) function = Rust::Function.new(@function_name) function.arguments = arguments if arguments function. = if return function.to_R end |