定番グラフ描きフリーウェア“Gnuplot”で Postscript 出力をするときには70種類の「点」 (points) が使えるようです (gnuplot-help より). どういう「点」があるのか上の図に出力してみました (set size 2.0 で大きめに描かせています). 図の見方ですが, 「(縦×10) + 横」の数字で1 から70 までの「点」を表しています. たとえば, 「+」は1, 「■」は5 と47, 「○」は65 (6 の○ は中心に小さな・があります…… 心眼が必要ですねえ) ……ということです.
#!/usr/bin/perl
# gp-points.pl
# KUBO Takuya (kubo@ees.hokudai.ac.jp) 1999.07.06
# USAGE: gp-points > [postscript file]
$gpfile = "points.gp";
$tmpdir = "tmpdata";
$imax = 7; # 0 <= $i < $imax
$jmax = 10; # 1 <= $j < 1 + $jmax
open GP, ">$gpfile"
or die "ERROR: Can't create $gpfile.";
print GP <<ENDOFHEADER;
set pointsize 2.0
set term post portrait
set size 1,0.5
set title "gnuplot points (1-70) in postscript"
set nokey
ENDOFHEADER
print GP "set xrange \[0.5:".($jmax + 0.5)."\]\n";
print GP "set yrange \[-0.5:".($imax - 0.5)."\]\n";
print GP "plot \\\n";
mkdir $tmpdir, 0777
or die "ERROR: Can't create $tmpdir.";
for($i = 0; $i < $imax; $i ++) {
for($j = 1; $j < 1 + $jmax; $j ++) {
$tmpfile = "$i$j";
open TMP, ">$tmpdir\/$tmpfile";
print TMP "$j\t$i\n";
close TMP;
print GP "\"$tmpdir\/$tmpfile\" w p ".($i * $jmax + $j).",\\\n";
}
}
print GP "\"$tmpdir\/".($imax-1).$jmax."\" w p ".($imax * $jmax)."\n";
close GP;
system "gnuplot $gpfile";
unlink $gpfile;
for($i = 0; $i < $imax; $i ++) {
for($j = 1; $j < 1 + $jmax; $j ++) {
unlink "$tmpdir\/$i$j";
}
}
rmdir $tmpdir;
exit 0