--new code-- print "Content-type: image/png\n\n"; sub InitColors { my($im) = $_[0]; # Allocate colors $white = $im->colorAllocate(255,255,255); $black = $im->colorAllocate(0,0,0); $red = $im->colorAllocate(255,0,0); $blue = $im->colorAllocate(0,0,255); $green = $im->colorAllocate(0, 255, 0); $brown = $im->colorAllocate(255, 0x99, 0); $violet = $im->colorAllocate(255, 0, 255); $yellow = $im->colorAllocate(255, 255, 0); } my @data = ([@xaxiss],[@yaxiss]); use GD::Graph::bars; use GD::Image; $width=$xaxiss[0]; $height=$xaxiss[$#xaxiss]; #image -1 graph my $mygraph = GD::Graph::bars->new(800,600); $mygraph->set_legend('Show gene details'); --changed portion-- $anotherfont = "/usr/share/fonts/ko/TrueType/hline.ttf"; $mygraph->set_stringFT('black', $anotherfont, 30,40, "Show gene details"); ---change ends--- $mygraph->set( title => "$pairs[0]", x_label => "@xaxis", x_labels_vertical => 90, bar_width => 10, bar_spacing => 1, show_values => 1, dclrs => ['lorange'] , axislabelclr => 'red', # logo => 'bgcolor1.png', /corect on/ # logo_resize =>5.5, transparent => 1, shadowclr => 'gray', shadow_depth =>3, borderclr=>'green', transparent => '0', bgclr => 'lbrown', boxclr => 'lbrown', fgclr => 'blue', cycle_clrs => '1', ) or warn $mygraph->error; $mygraph->set_title_font(GD::gdGiantFont); #$mygraph->set_legend_font(GD::gdGiantFont); $mygraph->set_x_axis_font(GD::gdMediumBoldFont); $mygraph->set_y_axis_font(GD::gdMediumBoldFont); $mygraph->set_values_font(GD::gdSmallFont); my $myimage = $mygraph->plot(\@data) or die $mygraph->error; #open(OUT,">/tmp/img1.png"); #binmode OUT; #print OUT $myimage->png; #close OUT; print $myimage->png;