[英]plotting gnuplot with palette showing some labels
I am plotting data series with gnuplot with command: 我正在用gnuplot命令绘制数据系列:
p 'file.txt' u 1:2:3 with labels
and got the graph with a lot of labels as below 并得到了带有很多标签的图形,如下所示
which looks messy. 看起来很乱 So, i use different command: 因此,我使用不同的命令:
p 'file.txt' u 1:2:3 with points pt 5 palette
which showed beautiful graph with colour spectrum. 它显示了带有色谱的漂亮图形。
But it did not show the labels. 但是它没有显示标签。 Acutally I don't need to show all labels, but I would like to show lowest five and highest five values. 基本上,我不需要显示所有标签,但我想显示最低的五个值和最高的五个值。
How can I mix these two commands so that I can show the graph with colour spectrum with 10 labels (5 for lowest five and another 5 for highest five). 如何混合使用这两个命令,以便可以显示带有10个标签的色谱图的图形(5个代表最低的5个,另外5个代表最高的5个)。 Thanks. 谢谢。
The labels style accepts a tc palette
option 标签样式接受tc palette
选项
Thus you can do 这样你就可以做
plot datafile u 1:2:3:3 with labels tc palette
For example, with the following data 例如,具有以下数据
1 1 30
1 2 40
2 2 30
2 1 35
3 3 10
3 4 15
using plot datafile u 1:2:3:3 with labels tc palette
will plot 使用plot datafile u 1:2:3:3 with labels tc palette
将进行图
In order to filter to only the top 5 and bottom 5 numbers, you will need to do some pre-processing of your data outside of gnuplot. 为了仅过滤前5个和后5个数字,您将需要对gnuplot之外的数据进行一些预处理。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.