用符号或点在标记内标记

时间:2018-04-09 07:31:51

标签: gnuplot

在问题的情节中

How to improve lines quality of a heat map

(代码和数据在此链接)我想用符号将点标记到图形中。由于该图表示地图,因此它可以是典型的谷歌地图点位置或任何其他符号,例如,旗帜,星星或正方形。 我见过在某个位置使用set label的示例。如何用符号标记标记图?

1 个答案:

答案 0 :(得分:1)

如果其中一个内置gnuplot点类型适合您,您只需在绘图命令中添加另一行,如

plot '-' notitle with points pt 7 ps 3
1 2
e

如下所述,您还可以使用字体字符:

plot '-' u 1:2:("{/Symbol \247}") notitle with labels
1 2
e

postscript字符代码列表为here。在这两种情况下,您当然也可以将坐标保存在单独的数据文件中(而不是使用内联数据)。

您也可以执行

之类的操作
set object circle at 1,2 size 0.5

实施例

链接的问题使用splot,这对于二维图不是必需的。以下是使用链接数据的示例:

set terminal pngcairo size 800,600
set output "test0.png"
set encoding iso_8859_1

set xlabel "longitude"
set ylabel "latitude"
set size square
set format cb "%2.0t{/Symbol \327}10^{%L}"
set autoscale fix
unset key
set yrange [:] reverse


plot 'pher-of-1365.txt' matrix with image, \
'-' with points pointtype 7 pointsize 2 lc "yellow"
20 40
e

set output

enter image description here