162
162
cairoplot.horizontal_bar_plot ( 'hbar_0_dictionary.svg', data, 400, 300, border = 20, display_values = True, grid = True, rounded_corners = True )
164
164
#Using default, rounded corners and 3D visualization
165
data = [ [0, 3, 11], [8, 9, 21], [13, 10, 9], [2, 30, 8] ]
165
data = [ [10, 3, 11], [8, 9, 21], [13, 10, 9], [2, 30, 8] ]
166
166
colors = [ (1,0.2,0), (1,0.7,0), (1,1,0) ]
167
167
series_labels = ["red", "orange", "yellow"]
168
cairoplot.horizontal_bar_plot ( 'hbar_1_default.svg', data, 400, 300, border = 20, grid = True, rounded_corners = False, colors = "yellow_orange_red" )
169
cairoplot.horizontal_bar_plot ( 'hbar_2_rounded.svg', data, 400, 300, border = 20, series_labels = series_labels, display_values = True, grid = True, rounded_corners = True, colors = colors )
168
y_labels = ["group 1", "group 2", "group 3", "group 4"]
169
cairoplot.horizontal_bar_plot ( 'hbar_1_default.svg', data, 400, 300, border = 20, grid = True, rounded_corners = False, colors = colors )
170
cairoplot.horizontal_bar_plot ( 'hbar_2_rounded.png', data, 400, 300, border = 20, grid = True, rounded_corners = True, y_labels = y_labels, colors = "yellow_orange_red" )
172
173
#Mixing groups and columns
206
207
cairoplot.pie_plot( "pie_1_default.svg", data, 600, 400 )
207
208
cairoplot.pie_plot( "pie_2_gradient_shadow.svg", data, 600, 400, gradient = True, shadow = True )
208
209
cairoplot.pie_plot( "pie_3_background.svg", data, 600, 400, background = background, gradient = True, shadow = True )
211
data = {"orcs" : 30, "goblins" : 30, "elves" : 30}
212
colors = [(1.0, 0.0, 0.0, 0.3, 'solid'), (0.0,1.0,0.0,1.0,'solid'), (0.0,0.0,1.0,0.3,'solid')]
213
cairoplot.pie_plot( "pie_4_alpha.svg", data, 600, 400, colors = colors )
210
215
if test_donut_plot :
211
216
#Define a new backgrond