标记单个数据点gnuplot [英] Labelling individual data points gnuplot

查看:209
本文介绍了标记单个数据点gnuplot的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想习惯gnuplot.我在此站点上搜索了几页以寻找答案,阅读了文档(4.6),但仍未找到答案.说我有一个像这样的数据文件:

Just trying to get used to gnuplot. I searched a few pages on this site looking for the answer, read the documentation (4.6), and still haven't found the answer. say I have a data file like this:

0.0 0
1.0 25
2.0 55
3.0 110
4.0 456
5.0 554
6.0 345

,我想标记图中的所有数据点.我该怎么做呢?我尝试了此建议plot 'exp.dat' u 1:2 w labels point offset character 0,character 1 tc rgb "blue",但是没有用.它给了我Not enough columns for this style的答复.我确定这是我在做的事,但不确定该怎么做.任何帮助,将不胜感激.谢谢.

and I want to label all the data points on the plot. How do I do this? I tried this suggestion plot 'exp.dat' u 1:2 w labels point offset character 0,character 1 tc rgb "blue" but it didn't work. It gave me a Not enough columns for this style response. I'm sure it's something I'm doing but I'm not sure what. Any help would be appreciated. Thanks.

推荐答案

我认为您缺少标签的字符串.你可以做

I think you are missing strings for labels. You can do

flabel(y)=sprintf("y=%.2f", y)
plot '-' u 1:2:(flabel($2)) w labels point offset character 0,character 1 tc rgb "blue"
0.0 0
1.0 25
2.0 55
3.0 110
4.0 456
5.0 554
6.0 345

这篇关于标记单个数据点gnuplot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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