You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Xmgrace设置:如何在2D绘图arg文件中添加命令设置Y轴范围

How to Set Y-Axis Range in Xmgrace .arg Files

Got it, let's fix that annoying empty space at the top of your Y-axis! To manually lock in the exact Y-axis range you need (0 to 12, matching your data), you just need to add two simple commands to your .arg file:

  • Use @ yaxis min <value> to define the lower bound of the Y-axis
  • Use @ yaxis max <value> to define the upper bound of the Y-axis

For your specific case, you'll add @ yaxis min 0 and @ yaxis max 12 to override Xmgrace's default auto-scaled range. Here's what your modified .arg file will look like (I also formatted the data lines for readability):

@ title "title"
@ xaxis label "Frame"
@ yaxis label "Number of hits"
@ yaxis min 0
@ yaxis max 12
@TYPE xy
0 0
1 1
2 3
3 8
4 7
5 8
6 8
7 8
8 8
9 12

By default, Xmgrace adds extra padding to axis ranges automatically, which is why you were seeing a Y-axis max of 40 even though your data only goes up to 12. These two commands force the axis to fit exactly your data's range, eliminating that empty upper space.

内容的提问来源于stack exchange,提问作者user8510929

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 06:26:10