26
26
#Using default, rounded corners and 3D visualization
27
27
data = [ [0, 3, 11], [8, 9, 21], [13, 10, 9], [2, 30, 8] ]
28
28
colors = [ (1,0.2,0), (1,0.7,0), (1,1,0) ]
29
series_labels = ["red", "orange", "yellow"]
29
30
cairoplot.vertical_bar_plot ( 'vbar_1_default', data, 400, 300, border = 20, grid = True, rounded_corners = False, colors = "yellow_orange_red" )
30
cairoplot.vertical_bar_plot ( 'vbar_2_rounded', data, 400, 300, border = 20, display_values = True, grid = True, rounded_corners = True, colors = colors )
31
cairoplot.vertical_bar_plot ( 'vbar_3_3D', data, 400, 300, border = 20, grid = True, three_dimension = True, colors = colors )
31
cairoplot.vertical_bar_plot ( 'vbar_2_rounded', data, 400, 300, border = 20, series_labels = series_labels, display_values = True, grid = True, rounded_corners = True, colors = colors )
32
cairoplot.vertical_bar_plot ( 'vbar_3_3D', data, 400, 300, border = 20, series_labels = series_labels, grid = True, three_dimension = True, colors = colors )
33
34
#Mixing groups and columns
34
35
data = [ [1], [2], [3,4], [4], [5], [6], [7], [8], [9], [10] ]
41
42
cairoplot.vertical_bar_plot ( 'vbar_5_no_labels', data, 600, 200, border = 20, grid = True )
42
43
cairoplot.vertical_bar_plot ( 'vbar_6_x_labels', data, 600, 200, border = 20, grid = True, x_labels = x_labels )
43
44
cairoplot.vertical_bar_plot ( 'vbar_7_y_labels', data, 600, 200, border = 20, grid = True, y_labels = y_labels )
44
cairoplot.vertical_bar_plot ( 'vbar_8_hy_labels', data, 600, 200, border = 20, grid = True, x_labels = x_labels, y_labels = y_labels )
45
cairoplot.vertical_bar_plot ( 'vbar_8_hy_labels', data, 600, 200, border = 20, display_values = True, grid = True, x_labels = x_labels, y_labels = y_labels )
47
48
data = [[10*random.random()] for x in range(50)]
64
65
#Using default, rounded corners and 3D visualization
65
66
data = [ [0, 3, 11], [8, 9, 21], [13, 10, 9], [2, 30, 8] ]
66
67
colors = [ (1,0.2,0), (1,0.7,0), (1,1,0) ]
68
series_labels = ["red", "orange", "yellow"]
67
69
cairoplot.horizontal_bar_plot ( 'hbar_1_default', data, 400, 300, border = 20, grid = True, rounded_corners = False, colors = "yellow_orange_red" )
68
cairoplot.horizontal_bar_plot ( 'hbar_2_rounded', data, 400, 300, border = 20, display_values = True, grid = True, rounded_corners = True, colors = colors )
70
cairoplot.horizontal_bar_plot ( 'hbar_2_rounded', data, 400, 300, border = 20, series_labels = series_labels, display_values = True, grid = True, rounded_corners = True, colors = colors )
70
73
#Mixing groups and columns
71
74
data = [ [1], [2], [3,4], [4], [5], [6], [7], [8], [9], [10] ]
72
75
cairoplot.horizontal_bar_plot ( 'hbar_4_group', data, 400, 300, border = 20, grid = True )
74
77
#Using no labels, horizontal and vertical labels
78
series_labels = ["data11", "data22"]
75
79
data = [[3,4], [4,8], [5,3], [9,1]]
76
80
x_labels = [ "line1", "line2", "line3", "line4", "line5", "line6" ]
77
81
y_labels = [ "group1", "group2", "group3", "group4" ]
78
cairoplot.horizontal_bar_plot ( 'hbar_5_no_labels', data, 600, 200, border = 20, grid = True )
79
cairoplot.horizontal_bar_plot ( 'hbar_6_x_labels', data, 600, 200, border = 20, grid = True, x_labels = x_labels )
80
cairoplot.horizontal_bar_plot ( 'hbar_7_y_labels', data, 600, 200, border = 20, grid = True, y_labels = y_labels )
81
cairoplot.horizontal_bar_plot ( 'hbar_8_hy_labels', data, 600, 200, border = 20, display_values = True, grid = True, x_labels = x_labels, y_labels = y_labels )
82
cairoplot.horizontal_bar_plot ( 'hbar_5_no_labels', data, 600, 200, border = 20, series_labels = series_labels, grid = True )
83
cairoplot.horizontal_bar_plot ( 'hbar_6_x_labels', data, 600, 200, border = 20, series_labels = series_labels, grid = True, x_labels = x_labels )
84
cairoplot.horizontal_bar_plot ( 'hbar_7_y_labels', data, 600, 200, border = 20, series_labels = series_labels, grid = True, y_labels = y_labels )
85
cairoplot.horizontal_bar_plot ( 'hbar_8_hy_labels', data, 600, 200, border = 20, series_labels = series_labels, display_values = True, grid = True, x_labels = x_labels, y_labels = y_labels )
84
88
data = [[10*random.random()] for x in range(25)]
85
89
x_labels = ["large label name oh my god it's big" for x in data]