gnuplotは初めてです。プロットの右上隅にあるボックスにシミュレーションパラメータを含める方法について教えてもらえますか?実際の曲線を表示するために使用される凡例のすぐ下にパラメータボックスを表示したいと思います。
フォームの3つのパラメーターのみを含めたい:
"GraphConnectivity: 0.2"
"Query: 0.2"
"Content: 0.2"
凡例のすぐ下のボックスに表示されます。
gnuplotは初めてです。プロットの右上隅にあるボックスにシミュレーションパラメータを含める方法について教えてもらえますか?実際の曲線を表示するために使用される凡例のすぐ下にパラメータボックスを表示したいと思います。
フォームの3つのパラメーターのみを含めたい:
"GraphConnectivity: 0.2"
"Query: 0.2"
"Content: 0.2"
凡例のすぐ下のボックスに表示されます。
このページには、ボックスにラベルを配置するための非常に優れた方法があります(gnuplot 4.2以降)。
これがラベル内の複数の行でどのように機能するかを確認するには、以下の行をコピーして、リンクから例に置き換えてみてください。
#
# Illustrate using character widths to put a box around a label
#
# each line of the label gets a separate variable here
label1 = "Label in"
label2 = "a box"
label3 = "rocks"
LABEL = label1."\n".label2."\n".label3
# this bit finds the longest part of the multi-line string
# to determine the box width
longlabel = (strlen(label1) > strlen(label2)) ? label1 : label2
longlabel = (strlen(longlabel) > strlen(label3)) ? longlabel : label3
# change 'char 2' below to reflect the number of lines in the label.
# you will also have to adjust the y-position of the rectangle manually
set obj 10 rect at -3,(-4-0.4) size char strlen(longlabel), char 3
set obj 10 fillstyle empty border -1 front
set label 10 at -3,-4 LABEL front center
ラベルを追加するには、次のようにしますset label
...
例えば
XVAL=???
YVAL=???
set label "GraphConnectivity: 0.2\nQuery: 0.2\nContent: 0.2" at screen XVAL,screen YVAL
ラベルを希望の場所に表示するには、XVALとYVALを少し試してみる必要があります。
または、次の3つのsetlabelコマンドを使用することもできます。
set label "GraphConnectivity: 0.2" at screen XVAL, screen YVAL
set label "Query: 0.2" at screen XVAL, screen YVAL offset character 0,-1
set label "Content: 0.2" at screen XVAL, screen YVAL offset character 0,-2
set object rectangle
ラベルの周りにボックスを配置するには、頭のない矢印を使用するか、コマンドを使用できます