Ejemplo n.º 1
0
def make_graph(results):
    g = SideBar()
    g.title = "Benchmark of Python Image Processing\n"\
              "resized, 10times, original image size 4288x2848\n" \
              "(on Ubuntu10.04, python2.6.5, Core2 Duo 1.40GHz)"
    g.title_font_size = 18.5
    g.legend_font_size = 18.5
    g.title_margin = 55
    g.right_margin -= 50
    g.sort = False
    g.x_axis_label = '[sec]'
    g.y_axis_label = 'modules'
    g.legend_font_size = 16
    g.theme_greyscale()
    small = [i.real for i in results['small']]
    medium = [i.real for i in results['medium']]
    large = [i.real for i in results['large']]
    g.data("small(180x120)", small)
    g.data("medium(600x400)", medium)
    g.data("large(1200x800)", large)
    g.labels = {
        0: 'kaa.imlib2',
        1: 'PIL',
        2: 'pgmagick(blob-read)',
        3: 'pgmagick(normal-read)',
        4: 'pgmagick(scale+sharpen)',
        5: 'opencv',
        6: 'pyimlib2',
        7: 'pyimlib2(+pgsharpen)'
    }
    g.display()
    g.write("test_gruffy.png")
Ejemplo n.º 2
0
def make_graph(results):
    g = SideBar()
    g.title = "Benchmark of Python Image Processing\n"\
              "resized, 10times, original image size 4288x2848\n" \
              "(on Ubuntu10.04, python2.6.5, Core2 Duo 1.40GHz)"
    g.title_font_size = 18.5
    g.legend_font_size = 18.5
    g.title_margin = 55
    g.right_margin -= 50
    g.sort = False
    g.x_axis_label = '[sec]'
    g.y_axis_label = 'modules'
    g.legend_font_size = 16
    g.theme_greyscale()
    small = [i.real for i in results['small']]
    medium = [i.real for i in results['medium']]
    large = [i.real for i in results['large']]
    g.data("small(180x120)", small)
    g.data("medium(600x400)", medium)
    g.data("large(1200x800)", large)
    g.labels = {0: 'kaa.imlib2',
                1: 'PIL',
                2: 'pgmagick(blob-read)',
                3: 'pgmagick(normal-read)',
                4: 'pgmagick(scale+sharpen)',
                5: 'opencv',
                6: 'pyimlib2',
                7: 'pyimlib2(+pgsharpen)'}
    g.display()
    g.write("test_gruffy.png")
Ejemplo n.º 3
0
 def test_writable(self):
     g = SideBar()
     g.data("test1", [1, 2, 3])
     g.data("test2", [3, 2, 1])
     g.write(TARGET_FILE)
Ejemplo n.º 4
0
from gruffy import SideBar

g = SideBar(800)
g.title = "Gruffy's Graph"

g.theme_pastel()
g.transparent = True
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.09"}

g.additional_line_values = True

g.write()