1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| $graph = GD::Graph::linespoints->new(1200, 600);
$graph->set(
x_label => "Genomic Window",
x_label_position => 1/2,
y_label => "Log2 corrected ratio",
y_max_value => 2,
y_min_value => -2,
zero_axis => 1,
title => "$files[$i]_$files[$j]",
x_label_skip => 20,
text_space => 16,
dclrs => ['blue', 'red'],
logo => "C:\\EasyPHP\\Perl\\NGS\\logo.gif",
logo_position => 'UR',
legend_placement => 'BL',
legend_spacing => 8,
) or die "$graph->error";
$graph->set_title_font(GD::gdGiantFont);
$graph->set_x_label_font(GD::gdMediumBoldFont);
$graph->set_y_label_font(GD::gdMediumBoldFont);
$graph->set_legend_font(GD::gdGiantFont);
$graph->set_legend("$files[$i]", "$files[$j]");
if ($abs_diff >= $threshold) {
$graph->set(show_values => 1);
}
$gd = $graph->plot([\@GW_1, \@log2_1, \@log2_2]) or die "$graph->error";
$out_gif = "$path"."\\"."$files[$i]"."_"."$files[$j]"."\.gif";
open (IMG, ">$out_gif") or die "problem while opening $out_gif : $!";
binmode IMG;
print IMG $gd->gif;
close IMG; |
Partager