在Gnuplot中的pm3d地图上添加引导线

时间:2016-01-04 17:48:53

标签: gnuplot heatmap

我尝试使用Gnuplot在pm3d地图上添加一些引导线。

以下是我用来绘制pm3d地图(my pm3d map)的代码。

set terminal post eps enhanced color solid "Helvetica" 16
set encoding iso_8859_1
set hidden3d
set pm3d map
set view map
unset surface
set size square
splot "map.ene" with image
set xlabel "RC1 ({\305})"
set ylabel "RC2 ({\305})"
set cblabel "{/Symbol D}G (kcal/mol)" offset 1,0,0
set xrange ["1":"11"]
set yrange ["5.5":"9.5"]
set cbrange ["-3.1":"0.0"]
set xtics 1
set ytics 1
set cbtics 1
set mxtics 2
set mytics 5
unset key
set palette defined (-3.1 "red", -2.5 "yellow", -1.5 "green", -0.5 "blue", 0 "white")
unset colorbox
set output "map.eps"
replot

map.ene的格式如下:

1.000 5.500 0.00000 i

现在我想在pm3d图上添加一条垂直线(x = 5.5)。我搜索了旧帖子,发现其他人已经提出了类似的问题。似乎有两种可能的解决方案:

1)为该行准备一个单独的数据文件(x.dat,5.5,y,0.0),然后使用下面的命令绘制。

splot "map.ene" with pm3d, "x.dat" using 1:2:(0.0) with points linecolor rgb "black"

2)使用" multiplot"设施在Gnuplot。

我试过了两个,都没有奏效。我已经播放了一段时间但是我不确定如何修改我原来的pm3d代码以添加引导线。

1 个答案:

答案 0 :(得分:1)

你可以在gnuplot中画线:

set arrow from first 5.5, graph 0 to first 5.5, graph 1 nohead

键入help coordinates以更好地调整上述命令。