简体   繁体   English

xmgrace 可以生成一维图吗?

[英]Can xmgrace produce 1D plots?

在此处输入图片说明 Is it possible to get in xmgrace a 1D plot, ie, a line with an arrow in front of it, subdivided in labeled subregions by means of vertical bars?是否有可能在 xmgrace 中获得一维图,即一条前面有箭头的线,通过竖线细分为标记的子区域? Thank you for your attention!感谢您的关注!

As I said in a comment, it is certainly possible, although not exactly comfortable.正如我在评论中所说,这当然是可能的,尽管不是很舒服。

  • Open xmgrace , go to Plot -> Graph appearance... , select the Frame tab and set the line style to None .打开xmgrace ,转到Plot -> Graph appearance... ,选择Frame选项卡并将线型设置为None
  • Go to Plot -> Axis properties... :转到Plot -> Axis properties...
    • select the X axis and tick Zero axis .选择X轴并勾选Zero axis Untick Display tick labels and Display tick marks if you want to get rid of those.如果您想摆脱它们,请取消Display tick marks Display tick labelsDisplay tick marks
    • select the Y axis and untick Display tick labels , Display tick marks and Display axis bar .选择Y轴并取消Display tick labelsDisplay tick marksDisplay axis bar

I don't think there is a straightforward way of having the axis end with an arrow, but you can add one from the Window -> Drawing objects dialog.我认为没有一种直接的方法可以让轴以箭头结束,但您可以从“ Window ->“ Drawing objects对话框中添加一个。

About the data: your file should have this format:关于数据:您的文件应具有以下格式:

x0 0 1
x1 0 1
x2 0 1
x3 0 1
x4 0 1

where x0, x1, etc are the values at which you want to draw the vertical lines.其中 x0、x1 等是您要绘制垂直线的值。 Import your file via the Data -> Import -> ASCII... dialog, choosing XYDY as set type.通过Data -> Import -> ASCII...对话框导入您的文件,选择XYDY作为设置类型。

Now open the Plot -> Set appearance... dialog, select the set, set the line type to None and change the line color (which affects the bar lines).现在打开Plot -> Set appearance...对话框,选择集合,将线条类型设置为None并更改线条颜色(这会影响条形线条)。 Go to Error bars and set Bar line to 0 and the Riser line to the width you want.转到Error bars Bar line并将Bar line设置为 0,将Riser line设置为您想要的宽度。 If you want to rescale the height of the vertical lines open the Axis properties and change the scale of the Y axis.如果要重新调整垂直线的高度,请打开Axis properties并更改Y轴的比例。 Here is an example of how the plot will look like at the end of this procedure:以下是此过程结束时图的外观示例:

最后的剧情

As I said, it is a very cumbersome procedure but it can be done :-)正如我所说,这是一个非常繁琐的过程,但可以做到:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM