gpt4 book ai didi

text - 是否可以设置标签相对于 gnuplot 中的键的位置?

转载 作者:行者123 更新时间:2023-12-04 17:36:22 25 4
gpt4 key购买 nike

我的情节的性质是绝对标签不起作用;我无法限制 y 中的范围,所以想知道是否有办法将我的标签文本包含在键内或相对于键放置(即下面)

set term png enhanced size 1024,768
set title "{/=15 1D My title}\n - by me"
set xlabel "x"
set ylabel "y"
set label "V_0 = 10\n E = 1" #this is the bit I want to reposition
set out 'trial.png'
set xrange [-2.5:2.5]
set arrow from -2,-2000 to -2,2000 nohead size screen 0.025,30,45 ls 1
set arrow from 2,-2000 to 2,2000 nohead size screen 0.025,30,45 ls 1
plot 'data.dat'

PS:还有,有没有更好的方法让我的垂直线在 x = -2 和 x = 2 处?箭头解决方案再次不理想,因为我的 y 范围通常大于或小于 2000。

最佳答案

在 gnuplot 中,您可以使用不同的坐标系来设置箭头、标签、键和对象。坐标可以指定为

  • first :左轴和底轴上的值。
  • second :右侧和顶部轴上的值。
  • graph :相对于轴内的区域,0,0左下角和 1,1是右上角。
  • screen : 相对于整个 Canvas 。
  • character : 取决于选择的字体大小。

  • 有了这个,您可以按以下方式设置箭头:
    set arrow from first -2,graph 0 to first -2,graph 1 nohead ls 1
    set arrow from first 2,graph 0 to first 2,graph 1 nohead ls 1

    您不需要设置 size如果你没有箭头。

    虽然我没有完全理解你的标签问题,但我相信你会用这些关于不同坐标类型的信息来解决它:
    set label "V_0 = 10\n E = 1" right at graph 0.9, graph 0.8

    关于text - 是否可以设置标签相对于 gnuplot 中的键的位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17744334/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com