Returns a new instance of Layout.
Parameters:
a customizable set of options
Options Hash (opts):
17 18 19 20 21 22 23 24
# File 'lib/plotly/layout.rb', line 17 def initialize(opts = {}) return unless opts.is_a?(Hash) opts.each do |k, v| v.convert_to(Plotly::Axis) if AXISES.include?(k) instance_variable_set("@#{k}", v) end end