Class: RubyPost::Coords

Inherits:
GraphOption show all
Defined in:
lib/graph.rb

Overview

set the axis coords, can be log or linear scale

Instance Method Summary collapse

Constructor Details

#initialize(x = 'linear', y = 'linear') ⇒ Coords

Returns a new instance of Coords.



189
190
191
192
# File 'lib/graph.rb', line 189

def initialize(x='linear',y='linear')
  @x = x
  @y = y
end

Instance Method Details

#compileObject



214
215
216
# File 'lib/graph.rb', line 214

def compile
  'setcoords(' + @x + ',' + @y + ");\n"
end

#linearlinearObject



199
200
201
202
# File 'lib/graph.rb', line 199

def linearlinear
  @x = 'log'
  @y = 'log'
end

#linearlogObject



204
205
206
207
# File 'lib/graph.rb', line 204

def linearlog
  @x = 'linear'
  @y = 'log'
end

#loglinearObject



209
210
211
212
# File 'lib/graph.rb', line 209

def loglinear
  @x = 'log'
  @y = 'linear'
end

#loglogObject



194
195
196
197
# File 'lib/graph.rb', line 194

def loglog
  @x = 'log'
  @y = 'log'
end