我们可以使用以下方法绘制箭头:
set arrow 1 from 0,-5 to 0,5
Run Code Online (Sandbox Code Playgroud)
但是,from和to位置使用的是x1y1轴。
如何让位置使用x1y2轴?我的y2轴不同于y1轴。
使用second坐标系:
# Set different ranges for y1 and y2
set y2range [-1:1]; set yrange [-10:10]; set xrange [-2*pi:2*pi]; set y2tics
set multiplot layout 2,1
# Set arrow using x1y1 coordinate system
set arrow 1 from 0,0 to 1,1
plot sin(x)
# Set arrow using x2y2 coordinate system (x2 = x1 because x2 is not set)
set arrow 1 from second 0,0 to second 1,1
plot sin(x)
Run Code Online (Sandbox Code Playgroud)
您可以看到区别:

| 归档时间: |
|
| 查看次数: |
1745 次 |
| 最近记录: |