Class: RubyPost::Coords
- Inherits:
-
GraphOption
- Object
- Object
- Option
- GraphOption
- RubyPost::Coords
- Defined in:
- lib/graph.rb
Overview
set the axis coords, can be log or linear scale
Instance Method Summary collapse
- #compile ⇒ Object
-
#initialize(x = 'linear', y = 'linear') ⇒ Coords
constructor
A new instance of Coords.
- #linearlinear ⇒ Object
- #linearlog ⇒ Object
- #loglinear ⇒ Object
- #loglog ⇒ Object
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
#compile ⇒ Object
214 215 216 |
# File 'lib/graph.rb', line 214 def compile 'setcoords(' + @x + ',' + @y + ");\n" end |
#linearlinear ⇒ Object
199 200 201 202 |
# File 'lib/graph.rb', line 199 def linearlinear @x = 'log' @y = 'log' end |
#linearlog ⇒ Object
204 205 206 207 |
# File 'lib/graph.rb', line 204 def linearlog @x = 'linear' @y = 'log' end |
#loglinear ⇒ Object
209 210 211 212 |
# File 'lib/graph.rb', line 209 def loglinear @x = 'log' @y = 'linear' end |
#loglog ⇒ Object
194 195 196 197 |
# File 'lib/graph.rb', line 194 def loglog @x = 'log' @y = 'log' end |