topfunky/gruff — Issue #17: Baseline drawn at incorrect position
Author: sandal
Created: 2011-12-06 06:32:36+00:00
State: open

I would expect the following code to draw a baseline at `y=3`, two thirds of the way between `y=1` and `y=4`:

```ruby
require 'gruff'

g = Gruff::Line.new
g.title = "My Graph"

g.data("Apples", [1, 2, 3, 4, 4, 3])
g.data("Oranges", [4, 8, 7, 9, 8, 9])
g.data("Watermelon", [2, 3, 1, 5, 6, 8])
g.data("Peaches", [9, 9, 10, 8, 7, 9])

g.labels = {0 => '2003', 2 => '2004', 4 => '2005'}
g.baseline_value = 3

g.write('my_fruity_graph.jpg')
```

However, as you can see from the image below, the baseline is being drawn very close to `y=4`. I'm not sure whether I've missed something about how `baseline_value` is meant to work, but this looks like it might be a bug.

![Image of baseline](http://practicingruby.com/my_fruity_graph.jpg)