参考-GD-Graphグラフサンプル

save.pl

sub save_chart
{
	my $chart = shift or die "Need a chart!";
	my $name = shift or die "Need a name!";
	local(*OUT);

	my $ext = $chart->export_format;

	open(OUT, ">$name.$ext") or 
		die "Cannot open $name.$ext for write: $!";
	binmode OUT;
	print OUT $chart->gd->$ext();
	close OUT;
}

1;

sample42.dat

1st,undef,60
2nd,52,61
3rd,53,61
4th,54,undef
5th,55,68
6th,56,66
7th,undef,65 
8th,58,61
9th,59,undef

sample54.dat

700.000 0.003485
699.750 -0.001097
699.500 -0.002087
699.250 0.001198
699.000 0.000286
698.750 -0.000158
698.500 0.000168
698.250 -0.000262
698.000 0.001695
697.750 0.001520
697.500 0.000413
697.250 0.001776
697.000 -0.000226
696.750 -0.001634
696.500 0.001075
696.250 0.002390
696.000 -0.000109
695.750 0.000572
695.500 0.000110
695.250 0.000005
695.000 -0.000334
694.750 -0.000543
694.500 0.000820
694.250 0.000451
694.000 0.001651
693.750 -0.000832
693.500 0.000726
693.250 0.000399
693.000 -0.001413
692.750 -0.000926
692.500 0.001384
692.250 0.000304
692.000 0.000731
691.750 0.000284
691.500 -0.001864
691.250 0.002392
691.000 -0.002022
690.750 -0.001963
690.500 0.000652
690.250 0.001707
690.000 0.001195
689.750 0.001182
689.500 0.001832
689.250 -0.001381
689.000 0.001112
688.750 0.000403
688.500 0.000576
688.250 -0.001397
以下(107行から1842行)省略

・SAMPLE54.DAT More


最終更新日:2005.1.17