我很感兴趣的是,为了设置具有以下格式的file.arg的Y轴的范围,应该在xmgrace 2D plot文件中添加什么命令:
@ title "title"
@ xaxis label "Frame"
@ yaxis label "Number of hits"
@TYPE xy
0 0
1 1
2 3
3 8
4 7
5 8
6 8
7 8
8 8
9 12例如,在该图中,沿Y方向的数据从0变化到12。使用默认的xmgrace设置,我有一个沿Y方向的最大值设置为40的图(数据为空,因为实际上没有大于12的值),这不利于可视化。我可以向arg文件添加什么命令来固定沿Y的范围?
发布于 2018-03-28 20:53:09
您需要的代码行是
@world x_min, y_min, x_max, y_max但是,在您的示例中,您还需要在文件的顶部放置一个头文件,这样整个文件就变成了
@version 50125
@world 0, 0, 9, 12
@title "title"
@xaxis label "Frame"
@yaxis label "Number of hits"
@TYPE xy
0 0
1 1
2 3
3 8
4 7
5 8
6 8
7 8
8 8
9 12还可以分别设置x_min、y_min、x_max和y_max的值,如下所示:
@world xmin 0
@world xmax 10
@world ymin 9
@world ymax 12如果您真的想手动编辑xmgrace文件,我建议使用pygrace之类的工具,或者使用grace内置的batch功能,这些功能在本文之前已经介绍过了(例如here或here )。
https://stackoverflow.com/questions/49531373
复制相似问题