File: test_labels_for_null_data.rb

package info (click to toggle)
ruby-gruff 0.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 852 kB
  • sloc: ruby: 4,929; makefile: 3
file content (27 lines) | stat: -rw-r--r-- 488 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require File.dirname(__FILE__) + "/gruff_test_case"

class TestLabelsForNullData < GruffTestCase

  def setup
    @dataset = [nil, 1, 2, 1, nil]

    @labels = {
        0 => '1',
        1 => '2',
        2 => '3',
        3 => '4',
        4 => '5'
    }
  end

  def test_labels
    g = Gruff::Line.new
    g.title = 'Labels For Null Data'
    g.labels = @labels
    g.data('data', @dataset)
    g.minimum_value = 0
    
    g.write("test/output/TestLabelsForNullData.png")
  end

end