我是gnuplot的新手。任何人都可以告訴我如何將我的模擬參數包含在劇情右上角的一個框中?我希望參數框在用於顯示實際曲線的圖例下方可見。gnuplot:在右上角的框中包含模擬參數
我想只包括三個參數的形式爲:
"GraphConnectivity: 0.2"
"Query: 0.2"
"Content: 0.2"
應在剛剛傳說下方的盒子是可見的。
我是gnuplot的新手。任何人都可以告訴我如何將我的模擬參數包含在劇情右上角的一個框中?我希望參數框在用於顯示實際曲線的圖例下方可見。gnuplot:在右上角的框中包含模擬參數
我想只包括三個參數的形式爲:
"GraphConnectivity: 0.2"
"Query: 0.2"
"Content: 0.2"
應在剛剛傳說下方的盒子是可見的。
This page有把一個標籤放在一個盒子裏(在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個集標籤命令:
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
命令