gnuplot xrange真的不是范围吗? [英] Gnuplot xrange not really a range?

查看:57
本文介绍了gnuplot xrange真的不是范围吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在gnuplot上绘制在x轴上没有实际范围顺序的图.

I try to make a plot on gnuplot which has no real range order on x-axis.

--------------------->
1 4 2 20 17 12 10 8

因此,它不是一个真正的函数,就像您用数学知识来解释它一样,但是它的x轴上有某种索引,没有编号顺序,从1到20,但是20可能是第一个,或者在中间..一切都可能混在一起..希望您理解我的意思,因为我希望gnuplot可以解决这个问题.

It's therefore not a real function as you would interpret it with math knowledge, but it has some sort of index on its x-axis which has no numbering order and runs from 1-20 but 20 could be the first, or in the middle.. everything may be mixed.. hope you understand what I mean cause I am hoping gnuplot can handle that.

也许我可以写我的数据文件,以便点2包含应该在y轴上存在的数据,而只是在x轴上四处移动标签?

maybe i can write my data file so that point 2 contains the data that should be there on the y-axis and just move the labels around on x-axis?

推荐答案

解决方案正在使用xticlabels,并在数据文件中添加了额外的列.即

Solution is using xticlabels and add an extra column in the data file. ie

#xdata ydata label 
0 2 1 
1 3 14
2 10 0 
3 8 20 
etc. 

command: plot "data.dat" using 1:2:xticlabels(3) with lp"

这篇关于gnuplot xrange真的不是范围吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆