gnuplot - 标记单个数据点 gnuplot

标签 gnuplot

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

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 响应。我确定这是我正在做的事情,但我不确定是什么。任何帮助将不胜感激。谢谢。

最佳答案

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

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

enter image description here

关于gnuplot - 标记单个数据点 gnuplot,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17520684/

相关文章:

gnuplot - 如何在 Gnuplot 中获取每个月的 xtic?

plot - Gnuplot:忽略数据文件中第一行的最短方法

graph - Gnuplot 平行坐标/轴绘图关键注释

Python 子进程 : how to pipe to gnuplot a command to plot a variable?

python - 如何将 python 模块与 shell 命令结合使用

python gnuplot读取csv文件以按读取顺序或行顺序在x轴上绘制时间

gnuplot - brew install gnuplot --with-qt --with-x11 不起作用

png - 如何用gnuplot在标题中显示 '@'并且输出格式为png?

c++ - 来自 std::vector<double> 的未格式化流输入

c - (Mac OSX) 将库添加到 C - 特别是 gnuplot