Esempio n. 1
0
    def test_boxplot(self):
        'It does a bloxplot for integers'
        box = IntBoxplot()
        box.append(1, 50)
        box.append(1, 40)
        box.append(1, 30)
        box.append(1, 40)
        box.append(2, 30)
        box.append(2, 10)
        box.append(2, 20)
        box.append(2, 40)
        box.append('no distrib', 40)
        counts = box.aggregated_array
        assert sum(counts.values()) == 9

        plot = box.ascii_plot
        assert '2:10.0,15.0,25.0,35.0,40.0 <-----[============|=======' in plot
Esempio n. 2
0
    def test_boxplot(self):
        'It does a bloxplot for integers'
        box = IntBoxplot()
        box.append(1, 50)
        box.append(1, 40)
        box.append(1, 30)
        box.append(1, 40)
        box.append(2, 30)
        box.append(2, 10)
        box.append(2, 20)
        box.append(2, 40)
        box.append('no distrib', 40)
        counts = box.aggregated_array
        assert sum(counts.values()) == 9

        plot = box.ascii_plot
        assert '2:10.0,15.0,25.0,35.0,40.0 <-----[============|=======' in plot
Esempio n. 3
0
    def test_int_boxplot(self):
        box = IntBoxplot()
        box.append(1, 50)
        box.append(1, 40)
        box.append(1, 30)
        box.append(1, 40)
        box.append(2, 30)
        box.append(2, 10)
        box.append(2, 20)
        box.append(2, 40)

        fhand = NamedTemporaryFile(suffix='.png')
        draw_int_boxplot(box, fhand=fhand)
Esempio n. 4
0
    def test_int_boxplot(self):
        box = IntBoxplot()
        box.append(1, 50)
        box.append(1, 40)
        box.append(1, 30)
        box.append(1, 40)
        box.append(2, 30)
        box.append(2, 10)
        box.append(2, 20)
        box.append(2, 40)

        fhand = NamedTemporaryFile(suffix='.png')
        draw_int_boxplot(box, fhand=fhand)