我有gnuplot的以下数据文件
1 0.5 0.9
2 -0.1 0.5
3 0.7 0.4
Run Code Online (Sandbox Code Playgroud)
其中第一列是x轴,2,3列是两个不同的图.x轴的坐标总是自然数,它们代表句子中单词的位置,2和3列只是句子中单词的函数结果.
我想知道是否可以在x轴上用句子中的单词标记"1","2",....
如果我愿意的话
1 A 0.5 0.9
2 green -0.1 0.5
3 apple 0.7 0.4
Run Code Online (Sandbox Code Playgroud)
然后代替1,2,3我会有"A""绿色""苹果".
如果可以使用gnuplot,请告诉我.
使用xticlabels
选择栏为您的自定义标签:
plot 'file' using 1:3:xticlabels(2)
Run Code Online (Sandbox Code Playgroud)