| Credits | Overview | Plotting Styles | Commands | Terminals |
|---|
前の例は、マーク多角形が、その一部分である線分の色を継承する場合の背景 色でのマークの塗り潰しを示していました。本節の例は、そのようなマークで 塗り潰し色と境界色をどのようにして別々に変え得るかを示しています。
本節の例で描画するデータは、 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)
最初のグラフは、マークの定義と plot コマンドの両方で fillstyle を指定 しない場合、それは set style fill の大域的な属性を継承することを示し ています。fillcolor を指定しない場合、それはデフォルトの plot 色の列に 従います。
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"
2 つ目のグラフは、塗り潰し色 (fillcolor) と線描色の両方を指定したもの です。そのため、keyentry が異なる塗り潰し色用に必要です。
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"