class CTioga2::Graphics::Styles::LocationStyle

This class represents various aspects of the location of a object within a plot, such as:

todo currently only X and Y axes are implemented.

Public Instance Methods

finalize!(plot_style) click to toggle source

Finalizes the location of the object, that is (for now) resolves references to default axes.

# File lib/ctioga2/graphics/styles/location.rb, line 53
def finalize!(plot_style)
  @xaxis, @yaxis = *get_axis_keys(plot_style)
end
get_axis_keys(plot_style) click to toggle source

Given a PlotStyle object, returns the axes keys as would PlotStyle#get_axis_key

# File lib/ctioga2/graphics/styles/location.rb, line 44
def get_axis_keys(plot_style)
  return [
          plot_style.get_axis_key(@xaxis || 'x'),
          plot_style.get_axis_key(@yaxis || 'y')
         ]
end