tags:

views:

30

answers:

0

I'm using the GD::bars module in Perl v 5.8, but I can't seem to get the font size on my graphs x and y labels and values to change. Here's the relevant code I am using:

use GD::Graph::bars3d;
use GD::Text;

$my_graph->set_title_font(gdMediumBoldFont, 15); 
$my_graph->set_x_label_font(gdMediumBoldFont, 15); 
$my_graph->set_y_label_font(gdMediumBoldFont, 15); 
$my_graph->set_x_axis_font(gdMediumBoldFont, 15); 
$my_graph->set_y_axis_font(gdMediumBoldFont, 15); 
$my_graph->set_legend_font(gdMediumBoldFont, 15); 

my $plot = $my_graph->plot(\@table_data); 

I also tried using

$my_graph->set_title_font('arial', 15); 
$my_graph->set_x_label_font('arial, 15); 
$my_graph->set_y_label_font('arial, 15); 
$my_graph->set_x_axis_font('arial, 15); 
$my_graph->set_y_axis_font('arial, 15); 
$my_graph->set_legend_font('arial, 15); 

and setting the font size to a huge number like 60 or something. But there isn't any change at all. I've tried different fonts as well, even trying /Arial.ttf but no luck.

Also, I'm saving my graph as a .gif file .