use Chart::Bars; $g = Chart::Bars->new(600,500); # chart size $g->add_dataset ('Berlin', 'Paris', 'Rome', 'London', 'Munich'); # name of the five items $g->add_dataset (10, 40, 60, 70, 12); # surface area $g->add_dataset (18, 20, 30, 30, 40); # population (Thousands) %hash = ('title' => 'Sold Cars in 2001', 'text_space' => 5, 'grey_background' => 'false', 'integer_ticks_only' => 'true', 'x_label' => 'City', 'y_label' => 'Number of Cars', 'legend' => 'bottom', 'legend_labels' => ['surface' , 'population'], 'min_val' => 0, 'max_val' => 70, 'grid_lines' =>'true', 'colors' => {'title' => 'red', 'x_label' => 'blue', 'y_label' => 'blue'} ); $g->set (%hash); $g->png ("bars.png"); # print chart to the file bars.png