本節の例で描画するデータは、 iris.dem
から取ったものです。 簡素化のため、別々のデータブロック $setosa, $versicolor, $virginicana を生成するデータ処理はここでは示していません。
array Square = [{-0.5,-0.5}, { 0.5,-0.5}, { 0.5, 0.5}, \
{-0.5, 0.5}, {-0.5,-0.5}]
$Triangle << EOD
0 0.5
0.433013 -0.25
-0.433013 -0.25
0 0.5
EOD
set mark 1 Square using 2:3
set mark 2 $Triangle using 1:2
set mark 3 $Triangle using 1:(-$2)
set object 1 rectangle from graph 0,0 to graph 1,1
set object 1 fillstyle solid fc "gray" behind
set title "White outline with solid color fill"
set style fill solid border lc 'white'
plot $setosa with marks mt 1 ps 1.5 title "setosa", \
$versicolor with marks mt 2 ps 2 title "versicolor", \
$virginica with marks mt 3 ps 2 title "virginica"
set style fill solid
plot $setosa with marks mt 1 ps 1.5 lw 2 notitle \
fc "gray" fs border lc '#1f77b4', \
$versicolor with marks mt 2 ps 2 lw 2 notitle \
fc "gray" fs border lc '#ff7f0e', \
$virginica with marks mt 3 ps 2 lw 2 notitle \
fc "gray" fs border lc '#2ca02c', \
keyentry with marks mt 1 ps 1.5 lw 2 \
fc bgnd fs border lc '#1f77b4' \
title "setosa", \
keyentry with marks mt 2 ps 2 lw 2 \
fc bgnd fs border lc '#ff7f0e' \
title "versicolor", \
keyentry with marks mt 3 ps 2 lw 2 \
fc bgnd fs border lc '#2ca02c' \
title "virginica"
竹野茂治@新潟工科大学