Method: CoordinateSystem.standard
- Defined in:
- lib/coordinate_system.rb
.standard(x_range, y_range, artist, labels = {:x => 'x', :y => 'y'}) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/coordinate_system.rb', line 21 def self.standard(x_range, y_range, artist, labels = {:x => 'x', :y => 'y'}) x_basis_vector = {:x => 1.0, :y => 0.0, :label => labels[:x]} y_basis_vector = {:x => 0.0, :y => 1.0, :label => labels[:y]} x_range = ContinuousRange.new(x_range) y_range = ContinuousRange.new(y_range) CoordinateSystem.new(Axis.new(x_basis_vector,x_range), Axis.new(y_basis_vector,y_range), artist, UNIT_TRANSFORM) end |