Credits Overview Plotting Styles Commands Terminals

例: パラメータ関数によるマーク (Example: parametric marks)

書式:

     set mark <tag> [start:end:increment] '+' using (f($1)):(g($1))

figure_parametric_marks

コマンド set mark の書式は、コマンド plot の書式に従います。よって ファイルや配列、データブロックから x,y 座標を読みこむだけでなく、疑似 ファイル '+' で示される標本化用の暗黙の変数を操作するパラメータ関数の 組でもマークを定義できます。以下参照: special_filenames

本節の例は、パラメータ関数によるマークの組を定義し、それらを線描スタイ ルと塗り潰しスタイルと組み合わせて描画記号群を生成する方法を示します。 この例は、以下のデモの一部分です。 mark_formulas.dem

     set angle degrees
     set mark 1 [t=0:360:10]  '+' using (sin(t)):(cos(t)) ### 円
     set mark 2 [t=0:360:120] '+' using (sin(t)):(cos(t)) ### 三角
     set mark 3 [t=0:360:90]  '+' using (sin(t)):(cos(t)) ### ひし型
     set mark 4 [t=0:360:72]  '+' using (sin(t)):(cos(t)) ### 五角形
     set mark 5 [t=0:360:60]  '+' using (sin(t)):(cos(t)) ### 六角形
     set mark 6 [t=0:360:10]  '+' using \
       (cos(t)):(0.8*(sqrt(abs(cos(t)))+sin(t)))          ### ハート
     set mark 7 [t=0:360:10]  '+' using \
       (r=0.5*abs(cos(3/2.0*t))+0.5, r*sin(t)):(r*cos(t)) ### 3 弁花
     set mark 8 [t=0:360:72/2]  '+' using \
       (r=0.4*(cos(5*t)+2), r*sin(t)):(r*cos(t))          ### 星
     set mark 9 [t=0:360:72/20] '+' using \
       (r=0.18*(cos(5*t)+5), r*sin(t)):(r*cos(t))         ### 5 弁花
     unset angle
     array dummy[1]
     S = 1.25       # 伸縮倍率
     plot \
       for [k=1:9] dummy using (k):(11):(sprintf("%i",k)) \
         with labels center, \
       for [k=1:9] dummy using (k):(9) with marks mt k ps S \
         fill solid 0.5 border lc 'black', \
       for [k=1:9] dummy using (k):(7) with marks mt k ps S \
         fill solid (1./k)     fc 'black', \
       for [k=1:9] dummy using (k):(5) with marks mt k ps S \
         fill solid 0.0 border lc 'black', \
       for [k=1:9] dummy using (k):(3) with marks mt k ps S \
         fill solid 1.0 noborder fc 'red', \
       for [k=1:9] dummy using (k):(1) with marks mt k ps S \
         fill solid 1.0 border lc 'blue'