我试图在gnuplot中将各个行的键放在每行旁边。我以为我可以在我的设定标签上做这个。但是,我无法弄清线条的颜色和类型。我正在尝试的是:
key label "C=#FFC000" at graph 0.015,0.955
我想让它读C =(颜色为#FFC000的线条)
谢谢,
没有自动的方法可以执行此操作,您必须手动执行此操作,并且必须分别设置文本标签和一行代码:
set angle degrees
set label "Label" at 1,1 right
set arrow from 1,1 to 1.1, 1 linewidth 3 linecolor rgb "#FF0000" nohead
set label "Twwwwoooooooooo" at 1,2 right
set arrow from 1,2 to 1.1, 2 linewidth 3 linecolor rgb "#00FF00" nohead
set label "WithOffset" at 2,2 right offset -1, 0
set arrow from 2,2 to 2.1, 2 linewidth 3 linecolor rgb "#0000FF" nohead
set label "Rotated" at 2,1 right rotate by 45
set arrow from 2,1 to 2+0.1*cos(45), 1+0.1*sin(45) linewidth 3 linecolor rgb "#FFC000" nohead
使用right
会使文本标签右移,并offset -1, 0
导致文本向左移动1个字符的宽度。(这比处理坐标更方便)
最后一个标签/箭头表明您也可以旋转标签。但是,虽然将文本简单地旋转了45°,但在两点之间画了线。因此,除非x / y单位的比率不为1(set size ratio -1
),否则该行将不会以45°角显示,否则您必须进行更多数学运算。
结果如下:
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句